release: fix RC release process #3919
Merged
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.
Description
Currently there is a problem when executing an RC release. The config.CLIVersion will be set to the RC even when the release process is running on the newer release tag. This likely has something to do with an interaction between
git describe --tag
and the default git configuration in GitHub actions. To avoid this problem, we are setting the tag explicitly using the built in GitHub variable$GITHUB_REF_NAME
for both make commands and goreleaser.I cannot do a direct test on a fork, as I have to comment some things out, but I have tried out these changes in my fork, and I was able to run an RC release, then a regular release with what is currently on main in that fork.
I verified locally using that {{ .Version }} is the exact same as {{ .Tag }} minus the v. It's also implied on this page https://goreleaser.com/customization/templates/
Fixes #3726
Checklist before merging