You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,7 +178,7 @@ steps:
178
178
179
179
## Getting go version from the go.mod file
180
180
181
-
The `go-version-file` input accepts a path to a `go.mod` file or a `go.work`
181
+
The `go-version-file` input accepts a path to a `go.mod` file, `.tool-versions` file or a `go.work`
182
182
file that contains the version of Go to be used by a project. The version taken
183
183
from thils file will be:
184
184
@@ -203,6 +203,15 @@ steps:
203
203
go-version-file: 'path/to/go.mod'
204
204
- run: go version
205
205
```
206
+
```yaml
207
+
steps:
208
+
- uses: actions/checkout@v5
209
+
- uses: actions/setup-go@v6
210
+
with:
211
+
go-version-file: '.tool-versions'
212
+
- run: go version
213
+
```
214
+
> 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)).
Copy file name to clipboardExpand all lines: action.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ inputs:
5
5
go-version:
6
6
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.'
7
7
go-version-file:
8
-
description: 'Path to the go.mod or go.work file.'
8
+
description: 'Path to the go.mod, .tool-versions, or go.work file.'
9
9
check-latest:
10
10
description: 'Set this option to true if you want the action to always check for the latest available version that satisfies the version spec'
0 commit comments