Skip to content

fix(release): pin the tag goreleaser releases - #2

Closed
sydorovdmytro wants to merge 1 commit into
mainfrom
fix/goreleaser-current-tag
Closed

fix(release): pin the tag goreleaser releases#2
sydorovdmytro wants to merge 1 commit into
mainfrom
fix/goreleaser-current-tag

Conversation

@sydorovdmytro

Copy link
Copy Markdown
Contributor

The v0.0.1 release run rebuilt and republished v0.0.1-alpha.2 instead, then failed
looking for an image tagged 0.0.1.

Both tags point at the same commit, and goreleaser picks the current tag off
git tag --points-at HEAD --sort=-version:refname — git's version sort ranks
v0.0.1-alpha.2 above v0.0.1. Setting GORELEASER_CURRENT_TAG to the tag the run
started on removes the guess.

Test plan

  • Locally with goreleaser 2.17.0 (the pinned version) on the commit carrying both tags:
    • without the env: using tags current=v0.0.1-alpha.2
    • with GORELEASER_CURRENT_TAG=v0.0.1: using tags current=v0.0.1, binary reports 0.0.1
  • actionlint and zizmor clean.

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.
@sydorovdmytro

Copy link
Copy Markdown
Contributor Author

Superseded by #1, which landed the same GORELEASER_CURRENT_TAG fix.

@sydorovdmytro
sydorovdmytro deleted the fix/goreleaser-current-tag branch August 19, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant