Skip to content

Commit 7013520

Browse files
authored
Merge pull request #435 from rvermeulen/rvermeulen/address-failing-release-view
Address failing gh release view with subshell
2 parents e0193ac + 579e425 commit 7013520

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

.github/workflows/prepare-release.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,7 @@ jobs:
6161
env:
6262
GITHUB_TOKEN: ${{ github.token }}
6363
run: |
64-
# Don't fail the step if gh fails to find the release
65-
set +e
66-
67-
release=$(gh release view v$RELEASE_VERSION --json name,isDraft)
64+
release=$( { gh release view "v$RELEASE_VERSION" --json name,isDraft; } || echo "" )
6865
if [[ -z "$release" ]]; then
6966
echo "Release v$RELEASE_VERSION does not exist. Proceeding"
7067
echo "create_draft_release=true" >> "$GITHUB_ENV"

0 commit comments

Comments
 (0)