Skip to content

Commit

Permalink
ci: gh release view throws when release does not exist
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Peder Meldgaard <[email protected]>
  • Loading branch information
jpm-halfspace committed Jan 23, 2025
1 parent ab6ddd0 commit ef9eb66
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/actions/promote-prerelease/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ runs:
gh release edit ${{ steps.set_release_name.outputs.release_name }} --prerelease=false
echo 'Deleting ${{ inputs.release_name_prefix }}_latest if exists'
RELEASE_EXISTS=$(gh release view ${{ inputs.release_name_prefix }}_latest --json name)
if [ $? -eq 0 ]; then
set +e
gh release view ${{ inputs.release_name_prefix }}_latest
LATEST_EXIST=$?
set -e
if [ $LATEST_EXIST -eq 0 ]; then
gh release delete ${{ inputs.release_name_prefix }}_latest --yes
fi
Expand Down

0 comments on commit ef9eb66

Please sign in to comment.