@@ -384,27 +384,35 @@ jobs:
384384 make ${MAKE_BUILD_ARGS} -C src/testdir clean
385385 make ${MAKE_BUILD_ARGS} -C src testgui
386386
387- # Creates a DMG package of MacVim. Note that this doesn't create a GitHub release for us, because we would prefer to
388- # do it manually, for two reasons: 1) signing / notarization are currently done out of CI, 2) we want to manually
389- # format our release notes and add pictures to make them look nice.
390387 - name : Build MacVim dmg image
391- if : startsWith(github.ref, 'refs/tags/') && matrix.publish
388+ if : matrix.publish && ( startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master')
392389 run : |
393390 # Use the --skip-jenkins flag to skip the prettify osascript calls which could fail due to permission issues in
394391 # CI environment.
395392 if ${{ matrix.legacy == true }}; then
396- make -C src macvim-dmg-legacy CREATEDMG_FLAGS=--skip-jenkins
393+ make -C src macvim-dmg-legacy
397394 else
398- make -C src macvim-dmg CREATEDMG_FLAGS=--skip-jenkins
395+ make -C src macvim-dmg
399396 fi
400397
401398 if ${{ matrix.publish_postfix != '' }}; then
402399 mv src/MacVim/build/Release/MacVim.dmg src/MacVim/build/Release/MacVim${{ matrix.publish_postfix }}.dmg
403400 fi
404401
402+ # Upload the dmg installer only when making tagged release or making a dev build from a master branch.
403+ # Note that this doesn't create a GitHub release for us, because we would prefer to do it manually, for two
404+ # reasons: 1) signing / notarization are currently done out of CI, 2) we want to manually format our release notes
405+ # and add pictures to make them look nice.
405406 - name : Upload MacVim image
406- if : startsWith(github.ref, 'refs/tags/') && matrix.publish
407+ if : matrix.publish && ( startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master')
407408 uses : actions/upload-artifact@v4
408409 with :
409410 name : MacVim${{ matrix.publish_postfix }}.dmg
410411 path : src/MacVim/build/Release/MacVim${{ matrix.publish_postfix }}.dmg
412+
413+ # If doing a tagged release, use repository-specified number of retention days (usually 90 days) to make it
414+ # easier to audit. (specify "0" to indicate using repository settings)
415+ #
416+ # Otherwise, we are just doing a dev build for potential testing, just use a maximum of 21 days as we don't
417+ # tend to need these for long.
418+ retention-days : ${{ startsWith(github.ref, 'refs/tags/') && 0 || (github.retention_days > 21 && 21 || 0) }}
0 commit comments