chore: allow CI to use latest Go patch updates by relaxing version check#496
Merged
chore: allow CI to use latest Go patch updates by relaxing version check#496
Conversation
go.mod requires a full major.minor.patch version since Go 1.21, so `go 1.25` must be `go 1.25.0`. Update check_go_version.sh to strip the patch when comparing against workflow go-version values, allowing workflows to use `go-version: "1.25"` (which actions/setup-go resolves to the latest 1.25.x patch) without the version check failing.
2 tasks
…nky promise (#498) Replace the GitHub API prerelease boolean check with semver.Version.Prerelease() filtering — because the version string is the source of truth, not metadata. Also: - Extract highestRelease() to eliminate 3x copy-pasted loops - Extract formatVersion() for the repeated Sprintf pattern - Fix pre-existing bug: missing continue after semver parse errors caused stale version from prior iteration to be used - Add table-driven tests for both helpers (there were none before)
johnstcn
approved these changes
Mar 25, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
go.modnow usesgo 1.25.0— Go 1.21+ requires a fullmajor.minor.patchversion; without the patch,go fmtnormalizes it to.0anywaycheck_go_version.shnow compares onlymajor.minorwhen validating workflowgo-versionvalues, so workflows can keep usinggo-version: "1.25"which letsactions/setup-goautomatically resolve the latest 1.25.x patch — previously, the exact-match check would fail because1.25 != 1.25.0Test plan
Lint fmtpasses (go.mod is valid)Check Go Versionspasses (major.minor comparison succeeds)--fixflag updates workflows tomajor.minorformat correctly