Repository navigation
Guard against mistakes when running the release action - #6138
Merged
Merged
Conversation
Releases run the release workflow of the stefanhaller/lazygit fork, but build the code of jesseduffield/lazygit. If the fork's master is behind, its copy of release.yml can differ from upstream's, and the release runs with outdated steps. This may only show up after the new tag has already been pushed. Stop the release right after checking out the code if the running release.yml differs from the one on jesseduffield/lazygit's master. Compare with master rather than with the branch being released. A patch release from a branch off an older tag carries an older release.yml, and it should still be released with the current workflow. This means that changes to release.yml can no longer be tried out in the fork before they land upstream. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
release.yml installs a fixed Go version for building a release, and it must match the release.yml on master. A patch release from a branch off an older tag is therefore built with master's Go version, not with the one that branch uses. For example, once master moves to Go 1.27, a v0.66.3 built from a branch off v0.66.2 would no longer run on macOS 12, although v0.66.2 does. Read the version from the go line of the checked-out go.mod instead, and add ".x" so that setup-go installs the latest patch release. setup-go's go-version-file input can't do this; for "go 1.26.0" it installs exactly 1.26.0. Read the version before pushing the tag, so that a go.mod without a go line stops the release early. This also removes release.yml from the files to edit when updating Go. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
stefanhaller
enabled auto-merge
October 16, 2026 12:55
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.
Releases are run from stefanhaller's fork, but if that fork is not up to date with jesseduffield's, bad things can happen. Guard against this by checking that the release.yml file in both is identical.
Also take the go version to build with from the go.mod file in the branch that is being released from, rather than hard-code it in release.yml; this could be relevant when making a release from a 0.66.3 branch when the go version has already been bumped on master.