Skip to content

Commit fac24a3

Browse files
committed
fix: handle existing releases in workflow
- Check if release already exists before creating - Prevents workflow failure on re-runs - Allows package upload to existing releases
1 parent 4e8c914 commit fac24a3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ jobs:
3838
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3939
TAG: ${{ github.ref_name }}
4040
VERSION: ${{ needs.version.outputs.version }}
41-
run: gh release create "$TAG" -t "$VERSION" --notes-from-tag
41+
run: |
42+
if gh release view "$TAG" > /dev/null 2>&1; then
43+
echo "Release $TAG already exists, skipping creation"
44+
else
45+
gh release create "$TAG" -t "$VERSION" --notes-from-tag
46+
fi
4247
- name: Download artifacts
4348
uses: actions/download-artifact@v4
4449
with:

0 commit comments

Comments
 (0)