Skip to content

Commit 9c804c8

Browse files
FBumannclaude
andcommitted
fix(ci): gate github-release on publish and add idempotency check
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8988bda commit 9c804c8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/publish.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ jobs:
4343

4444
github-release:
4545
name: Create GitHub Release
46-
if: github.event_name == 'push'
46+
needs: [publish]
47+
if: github.event_name == 'push' && needs.publish.result == 'success'
4748
runs-on: ubuntu-24.04
4849
steps:
4950
- uses: actions/checkout@v4
@@ -52,6 +53,10 @@ jobs:
5253

5354
- name: Create GitHub Release
5455
run: |
56+
if gh release view "$TAG" &>/dev/null; then
57+
echo "Release $TAG already exists, skipping."
58+
exit 0
59+
fi
5560
if [[ "$TAG" == *-* ]]; then
5661
gh release create "$TAG" --generate-notes --prerelease
5762
else

0 commit comments

Comments
 (0)