GitHub Actions setup-go "Unable to find Go version"
actions/setup-go resolves go-version (or go-version-file) against the official Go release feed. A non-existent version, or a go.mod that pins a toolchain with no published build, fails resolution.
What this error means
A setup-go step fails resolving the version, often after a typo, a yanked patch, or a go.mod toolchain line pointing at an unreleased version.
Error: Unable to find Go version '1.23.99' for platform linux and architecture amd64.Common causes
Version not in the Go release feed
setup-go matches against published Go releases; a version that was never released for the platform cannot be found.
go-version-file points at an unpublished toolchain
A go.mod toolchain directive or .go-version file requesting an unreleased version drives the same failure.
How to fix it
Pin a published version or use a range
- Use a minor spec like 1.23.x so setup-go selects the newest published patch.
- If using go-version-file, confirm the toolchain in go.mod is released.
- Avoid hand-typed exact patches that may not exist.
- uses: actions/setup-go@v5
with:
go-version: '1.23.x'How to prevent it
- Prefer a minor range (1.23.x) over an exact patch in CI.
- Keep go.mod toolchain and the workflow go-version aligned.
- Latchkey managed runners auto-retry the Go download on transient network failures and keep recent toolchains in a warm cache.