Skip to content

Conversation

AustinAbro321
Copy link
Contributor

@AustinAbro321 AustinAbro321 commented Jun 18, 2025

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

Copy link

netlify bot commented Jun 18, 2025

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 427a1e1
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/685d7fe7f26d960008fc6457

Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Copy link

codecov bot commented Jun 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

see 15 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
@AustinAbro321 AustinAbro321 marked this pull request as ready for review June 27, 2025 11:20
@AustinAbro321 AustinAbro321 requested review from a team as code owners June 27, 2025 11:20
Copy link
Member

@brandtkeller brandtkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - more explicit. If there were more areas when CLI_VERSION is consumed I might advocate for setting it in $GITHUB_ENV but I think that is entirely a nit (and I didn't validate that it definitively solves the issue across multiple jobs/steps).

Otherwise the $GITHUB_REF_NAME and GORELEASER_CURRENT_TAG tracks given source documentation.

@AustinAbro321 AustinAbro321 added this pull request to the merge queue Jun 27, 2025
Merged via the queue into main with commit 859fd8b Jun 27, 2025
27 checks passed
@AustinAbro321 AustinAbro321 deleted the enable-rc-releases branch June 27, 2025 20:10
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.

bug(CI): build-release workflow Build CLI step matching incorrect tag
2 participants