The `go-version-file` input accepts a path to a `go.mod` file or a `go.work`
The `go-version-file` input accepts a path to a `go.mod` file, `.tool-versions` file or a `go.work`
file that contains the version of Go to be used by a project. The version taken
from thils file will be:
@ -203,6 +203,15 @@ steps:
go-version-file: 'path/to/go.mod'
- run: go version
```
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version-file: '.tool-versions'
- run: go version
```
> The [.tool-versions file](https://asdf-vm.com/manage/configuration.html#tool-versions) supports version specifications in accordance with asdf standards, adhering to Semantic Versioning ([semver](https://semver.org)).
description:'The Go version to download (if necessary) and use. Supports semver spec and ranges. Be sure to enclose this option in single quotation marks.'
go-version-file:
description:'Path to the go.mod or go.work file.'
description:'Path to the go.mod, .tool-versions, or go.work file.'
check-latest:
description:'Set this option to true if you want the action to always check for the latest available version that satisfies the version spec'