From 06d4069076bfbbeaf9695139866b1b0ebf6b1df2 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Sun, 24 May 2026 17:36:01 +0200 Subject: [PATCH] ci: pin GoReleaser to the triggering tag, fix tag-collision regression When v0.3.1 was tagged on the same commit as v0.3.1-rc2, the release workflow built and tried to publish rc2 artifacts instead of v0.3.1, failing with 'already_exists' on every asset upload. Root cause: goreleaser-action@v6 + 'version: latest' (locked to v2.x) falls back to 'git describe --tags' for the current tag, which picked v0.3.1-rc2 over v0.3.1 when both refs pointed at HEAD. Explicitly setting GORELEASER_CURRENT_TAG = github.ref_name forces the workflow to use the tag that triggered it, regardless of other refs at the same commit. --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 81522fc..fb0026c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,3 +61,8 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Force GoReleaser to use the triggering tag rather than fall + # back to `git describe` — which can resolve to an older tag + # (e.g., a vX.Y.Z-rc tag) when multiple tags point at the same + # commit. Surfaced as the v0.3.1 release failure on 2026-05-24. + GORELEASER_CURRENT_TAG: ${{ github.ref_name }}