From adbb3c7fc8a6e2b945451c0c02ef603c426a2b75 Mon Sep 17 00:00:00 2001 From: Dmytro Sydorov Date: Wed, 19 Aug 2026 15:12:47 +0200 Subject: [PATCH] fix(release): pin the tag goreleaser releases goreleaser resolves the current tag from `git tag --points-at HEAD --sort=-version:refname`, which ranks v0.0.1-alpha.2 above v0.0.1. With a stable tag on the same commit as its prerelease it rebuilt and republished the prerelease, and the digest step then found no image for the tag being released. --- .github/workflows/release.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 48a3066..bf28e5d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -106,6 +106,11 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # The tag being released, not whichever tag goreleaser finds on HEAD. + # It resolves one from `git tag --points-at HEAD --sort=-version:refname`, + # and git's version sort ranks v0.0.1-alpha.2 above v0.0.1, so a stable + # tag on the same commit as its prerelease republishes the prerelease. + GORELEASER_CURRENT_TAG: ${{ steps.tag.outputs.value }} # Pushing the cask to loft-sh/homebrew-tap is a cross-repo write, which # GITHUB_TOKEN cannot do. HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}