Repository navigation
Release the tag that was pushed, not the rc - #23
Merged
Merged
Conversation
goreleaser picks among the tags pointing at HEAD with `--sort=-version:refname`, and git's versionsort ranks `v0.1.6-rc.2` above `v0.1.6` unless `versionsort.suffix` is set: it reads the suffix as more refname, not as a semver prerelease. A final tag placed on the same commit as its last release candidate — the normal case when the rc needed no further fixes — therefore rebuilt the rc. Every artifact carried the rc version and the upload died 422, because the rc's own release already held those asset names. v0.1.6 failed exactly this way. GORELEASER_CURRENT_TAG pins the build to `github.ref_name`, which is the tag the workflow was triggered by.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
v0.1.6release run failed. The tag sits on8f9012d, the samecommit as
v0.1.6-rc.2— the normal case when a release candidateneeds no further fixes — and goreleaser rebuilt the rc instead:
Left to itself goreleaser picks among the tags pointing at HEAD with
--sort=-version:refname, and git's versionsort ranks the rc higherunless
versionsort.suffixis configured — it reads-rc.2as morerefname, not as a semver prerelease:
So every artifact carried the rc version, and the upload then died on
the rc's own release, which already holds those asset names since
8 September. That release is unharmed — the 422 is what protected it —
and no
v0.1.6release was created.GORELEASER_CURRENT_TAGpins the build togithub.ref_name, the tagthe workflow was triggered by. Setting
versionsort.suffixinsteadwould work too, but it fixes the ordering by enumerating suffixes we
happen to use today; taking the tag from the trigger has nothing to
guess.
The fix has to land in
masterbeforev0.1.6can ship: CI reads theworkflow from the tagged ref, so the tag must point at a commit that
carries it. Once this merges I'll move
v0.1.6onto the newmasterHEAD and push — the current tag has no release behind it, so nothing
downstream can have consumed it.