fix(goreleaser): read the Go version from go.mod - #137
Merged
Merged
Conversation
The release job pinned go-version '1.26' while every other job reads go.mod. GoReleaser runs with GOTOOLCHAIN=local, so once the services moved to go 1.27.1 it stopped with "go.mod requires go >= 1.27.1 (running go 1.26.8)" on every v* tag, and no GitHub Release was cut. go-version now defaults to empty and setup-go reads go-version-file (go.mod), so the binary is built with the toolchain CI tested. An explicit go-version still overrides it.
duynhne
added a commit
that referenced
this pull request
Oct 2, 2026
docs/workflows.md still gave goreleaser's go-version default as 1.26; since #137 it is empty and setup-go reads go-version-file (go.mod), so the page now says that and lists the new input. sonarqube.yml declared a go-version input (default 1.25) that nothing read: the workflow has no setup-go step. No caller passes it (checked across the 26 workflow files that call it), so it is removed along with its doc row.
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.
Why
All 10 service tags cut today for Go 1.27.1 (user v2.5.0 … checkout v0.13.0) failed in
release-binary / release:goreleaser.ymldefaultedgo-version: '1.26', whilego-checkandgovulncheckreadgo.mod. Images were built, pushed and signed; only the GitHub Release (tarball, checksums, cosign signature, SBOM) is missing.What
go-versionnow defaults to'', and a newgo-version-fileinput defaults togo.mod. Withgo-versionempty,setup-goreads the version from the file, so the release binary uses the same toolchain CI tested.go-versionexplicitly still overrides it.actionlintpasses. No caller passesgo-versiontoday, so every caller picks this up when it re-pins.Note, not changed here:
sonarqube.yml'sgo-versioninput (default'1.25') is unused, because that workflow has no setup-go step.