Skip to content

Take the CI Go version from go.mod - #16

Merged
umputun merged 1 commit into
masterfrom
ci/go-version-from-go-mod
Nov 6, 2026
Merged

umputun merged 1 commit into
masterfrom
ci/go-version-from-go-mod

Conversation

@paskal

@paskal paskal commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Previously, the workflow pinned the Go version in actions/setup-go separately from go.mod. After this change, CI reads the major and minor version from the go directive in go.mod and installs the latest patch release of it with check-latest: true. go-version-file would install exactly the patch version written in go.mod, such as 1.25.0, so it is not used.

The resolved version does not change: CI installs the latest Go 1.24 patch release, as before. Seven example modules drop their toolchain go1.24.6 line, which specified a suggested toolchain. Their go 1.24.0 line stays, because their dependencies declare go 1.24.0 and go mod tidy would restore it.

On this branch, setup-go installs Go 1.24.13 and the build passes; the seven example modules build without their toolchain lines.

CI pinned its Go version separately from go.mod. It now reads the major
and minor version from the go directive and installs the latest patch
release of it.

Seven example modules drop their toolchain go1.24.6 line, which
specified a suggested toolchain. Their go 1.24.0 line stays: their
dependencies declare go 1.24.0, so go mod tidy would restore it.
@paskal
paskal requested a review from umputun as a code owner November 1, 2026 10:49
@umputun
umputun merged commit 61c0814 into master Nov 6, 2026
4 checks passed
@paskal
paskal deleted the ci/go-version-from-go-mod branch November 7, 2026 08:15
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.

2 participants