From 6a15171f008585552d4a35b7a0cdf6d41a46930a Mon Sep 17 00:00:00 2001 From: Min Huang <70873102+min0625@users.noreply.github.com> Date: Mon, 13 Jul 2026 10:11:22 +0000 Subject: [PATCH] fix(release): pin GORELEASER_CURRENT_TAG to the triggering tag When two tags point at the same commit (v0.0.1 tagged on the v0.0.1-beta.8 commit), GoReleaser auto-detected v0.0.1-beta.8 as the current tag and tried to re-upload assets to the existing beta.8 release, failing with 422 already_exists. Pin the tag from github.ref_name so the release always targets the tag that triggered the workflow. Co-Authored-By: Claude Fable 5 --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e09520..945d27f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,3 +38,7 @@ jobs: run: make release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # When several tags point at the same commit (e.g. v0.0.1 tagged on + # the v0.0.1-beta.N commit), GoReleaser's tag auto-detection may pick + # the wrong one; pin it to the tag that triggered this run. + GORELEASER_CURRENT_TAG: ${{ github.ref_name }}