Make go-version-file: go.mod the default

Open
#523 9 comments 10 reactions 0 assignees View on GitHub

Maintainers usually reply within 5 days

@raeperd is already working on this.

Since Oct 12, 2025.

  • #660 by @raeperd — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go, typescript
Domain
ci-cd, devops

Research direction

Start by inspecting setup-go's handling of the go-version-file input and the existing version-resolution tests. Verify how a go.mod version could become the default while preserving the installed Go version as fallback. Done means workflows without an explicit input use go.mod when present and otherwise retain the current fallback behavior.

Written by the indexing model from the issue text.

Description

feature request

Description:
Currently, I have to add

with:
  go-version-file: go.mod

for all builds to specify a go version. Instead, the "default" go version that any go program would use is the one from the go.mod with fallback to the installed go version. This should be the default for setup-go, too.

Justification:
Simplify developer's life.

Are you willing to submit a PR?

Dominant language
TypeScript
Stars
1.8k
Forks
684
Avg merge
12d 23h
Merged PRs (30d)
3

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from actions/setup-go

All issues in actions/setup-go

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.