fix(ci): skip GitHub release creation when tag already exists

Multiple pipeline runs for the same base version produce identical
release tags, causing E422. Check if release exists before creating.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson 2026-03-18 10:27:36 -06:00
parent 4c98d3e708
commit 119c8d74b4

View file

@ -164,10 +164,15 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "v${{ steps.base-version.outputs.version }}" \
--title "v${{ steps.base-version.outputs.version }}" \
--generate-notes \
--latest
TAG="v${{ steps.base-version.outputs.version }}"
if gh release view "$TAG" >/dev/null 2>&1; then
echo "Release $TAG already exists — skipping"
else
gh release create "$TAG" \
--title "$TAG" \
--generate-notes \
--latest
fi
update-builder:
name: Update CI Builder Image