We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 450ee2a commit 1b649bcCopy full SHA for 1b649bc
.github/workflows/release-abort-release.yml
@@ -111,10 +111,9 @@ jobs:
111
REPO: ${{ github.event.inputs.repository_name }}
112
run: |
113
set -euo pipefail
114
-
115
- release_json="$(gh api -H 'Accept: application/vnd.github+json' "/repos/$OWNER/$REPO/releases/tags/$TAG" || true)"
116
- if [ -n "$release_json" ]; then
117
- # only pre-releases can be removed
+
+ if release_json="$(gh api -H 'Accept: application/vnd.github+json' \
+ "/repos/$OWNER/$REPO/releases/tags/$TAG" 2>/dev/null)"; then
118
if [ "$(jq -r '.prerelease' <<<"$release_json")" != "true" ]; then
119
echo "❌ Release $TAG exists but is *not* marked as a pre-release. Aborting."
120
exit 1
0 commit comments