Skip to content

Commit 07e578a

Browse files
committed
fix(ci): check builds existence when release
1 parent a21f3fc commit 07e578a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/_release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ on:
2020
jobs:
2121
github:
2222
runs-on: macos-11
23+
outputs:
24+
check: ${{ steps.check.outputs.result }}
2325
steps:
2426
- name: Download pre-built emacs-builder artifact
2527
uses: actions/download-artifact@v3
@@ -40,18 +42,25 @@ jobs:
4042
with:
4143
name: ${{ inputs.dmg_artifact }}
4244
path: builds
45+
- name: Check if builds folder exists
46+
id: check
47+
continue-on-error: true
48+
run: |
49+
echo "result=$([ -d 'builds' ] && echo 'ok' || echo 'fail')" >> $GITHUB_OUTPUT
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4352
- name: Publish disk images to a GitHub Release
44-
if: ${{ steps.dmg.outputs.result != 'fail' }}
53+
if: ${{ steps.check.outputs.result != 'fail' }}
4554
run: >-
4655
bin/emacs-builder -l debug release --plan build-plan.yml publish
4756
$(find builds -name '*.dmg' -or -name '*.sha256')
4857
env:
4958
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5059
# - name: Trigger update casks workflow in homebrew tap
51-
# if: ${{ steps.dmg.outputs.result != 'fail' && inputs.testBuildName == '' }}
60+
# if: ${{ steps.check.outputs.result != 'fail' && inputs.testBuildName == '' }}
5261
# run: >-
5362
# gh workflow run --repo emacs-ng/homebrew-emacsng-builds update-casks.yml
5463
# env:
5564
# GITHUB_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
5665
- run: echo 'No DMG artifact available, was there a new commit to build?'
57-
if: ${{ steps.dmg.outputs.result == 'fail' }}
66+
if: ${{ steps.check.outputs.result == 'fail' }}

0 commit comments

Comments
 (0)