From 390676198a1c32a72b41fe3b9bf2b634096a5593 Mon Sep 17 00:00:00 2001 From: Dani Issac <137325823+daniissac@users.noreply.github.com> Date: Wed, 15 Jul 2026 18:54:28 +0530 Subject: [PATCH] Make GitHub release creation idempotent --- .github/workflows/publish.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 787a01d..2142e0b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -130,6 +130,11 @@ jobs: env: GH_TOKEN: ${{ github.token }} run: | + if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then + echo "GitHub Release ${{ github.ref_name }} already exists; skipping creation." + exit 0 + fi + gh release create "${{ github.ref_name }}" dist/* \ --title "${{ github.ref_name }}" \ --notes "See [CHANGELOG.md](CHANGELOG.md) for details."