From 6c1bcb00119f6456b31f23a40d756003a2b99773 Mon Sep 17 00:00:00 2001 From: Borja Toron Date: Thu, 5 Mar 2026 15:44:45 -0500 Subject: [PATCH] fix: make tag creation idempotent in release workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skip tag creation if it already exists, allowing workflow re-runs to succeed after a failed publish step. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94dbdbe..e2c087e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,8 +35,12 @@ jobs: git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" TAG="v${{ steps.version.outputs.version }}" - git tag -a "$TAG" -m "Release $TAG" - git push origin "$TAG" + if git rev-parse "$TAG" >/dev/null 2>&1; then + echo "Tag $TAG already exists, skipping creation" + else + git tag -a "$TAG" -m "Release $TAG" + git push origin "$TAG" + fi - name: Install uv uses: astral-sh/setup-uv@v4