mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-02-18 00:17:39 +01:00
fix: Handle 404 response in release existence check
This commit is contained in:
5
.github/workflows/create-release.yml
vendored
5
.github/workflows/create-release.yml
vendored
@@ -406,10 +406,11 @@ jobs:
|
||||
IS_PRERELEASE="${{ needs.extract_version.outputs.is_prerelease }}"
|
||||
|
||||
# Check if a release already exists for this tag
|
||||
# Note: gh api returns JSON error on 404, so check for valid release ID
|
||||
EXISTING_RELEASE=$(gh api "repos/${{ github.repository }}/releases/tags/${TAG}" 2>/dev/null || echo "")
|
||||
RELEASE_ID=$(echo "$EXISTING_RELEASE" | jq -r '.id // empty')
|
||||
|
||||
if [ -n "$EXISTING_RELEASE" ]; then
|
||||
RELEASE_ID=$(echo "$EXISTING_RELEASE" | jq -r '.id')
|
||||
if [ -n "$RELEASE_ID" ]; then
|
||||
RELEASE_URL=$(echo "$EXISTING_RELEASE" | jq -r '.html_url')
|
||||
IS_DRAFT=$(echo "$EXISTING_RELEASE" | jq -r '.draft')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user