Repository navigation
fix(go-binary-release): build with the newest patch of the declared Go minor - #19
Merged
Merged
Conversation
…o minor setup-go with go-version-file installed go.mod's exact version, so a module declaring go 1.26.0 shipped binaries built with go1.26.0 while go 1.26 got the latest 1.26.x. Releases of the same day ranged from go1.24.0 to go1.27.3. A new step resolves the minor of the go directive (or of a newer toolchain line) and setup-go installs its latest patch with check-latest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 7, 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 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.
Release builds used
go-version-file, which installs go.mod's exact version. On 2026-11-07 the 24 released tools were built with anything from go1.24.0 to go1.27.3:go 1.26.0gave go1.26.0 (no patch fixes since),go 1.26gave go1.26.10.Change (both setup-go steps of
go-binary-release.yml):Resolve Go versionreads thegodirective's minor (and atoolchainline's, if newer) from the module's go.mod.setup-goinstalls the latest patch of that minor (go-version: 1.26,check-latest: true).godirective stays the floor for users; it no longer pins the compiler of shipped binaries.No input, default, job name or permission changes.
go-package-release.ymlonly runs tests with setup-go and is unchanged.Tests:
scripts/selftest/go-version.shruns the exact step script (viaextract-step.py) on fixtures:go 1.26.0,go 1.26, newer toolchain, same-minor toolchain, two-digit minor (1.9 vs 1.10), no go directive, missing file. It also checks both copies of the step are identical. New Selftest jobgo-version. README section "Go version of release builds" and an AGENTS.md Commands row.otfabric-policy check: compliant.Callers pick this up when they move their pin to the tag that contains it.
🤖 Generated with Claude Code