setup-go
setup-go copied to clipboard
feat: use go.mod when no version inputs specified
Description:
This PR adds automatic go.mod detection when neither go-version nor go-version-file is specified. This simplifies workflows for Go projects that already have a go.mod file.
Before:
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- run: go version
After:
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
# Automatically detects and uses go.mod from repository root
- run: go version
Related issue: Closes #523
Check list:
- [x] Mark if documentation changes are required.
- [x] Mark if tests were added or updated to cover the changes.