1
0
Fork 0
mirror of https://github.com/actions/setup-go synced 2024-11-14 17:42:40 +00:00

add go-version output when using go.mod

This commit is contained in:
Victor Martinez 2023-08-15 14:23:31 +02:00
parent 4878e37175
commit fde5dd24bd
No known key found for this signature in database
GPG key ID: 419518ED0DA3CBCF

View file

@ -196,6 +196,8 @@ steps:
- run: go version - run: go version
``` ```
Finally, the `go-version` output contains the resolved Golang version from the `go.mod` file.
### If a different file ### If a different file
The `go-version-file` input accepts a path to a file that contains the version of Go to be used by a project. It supports either major and minor (e.g 1.18) or major, minor and patch (e.g 1.18.7) tags. If the file contains only major and minor (e.g. 1.18) tags, the action will follow the above-mentioned approach. The `go-version-file` input accepts a path to a file that contains the version of Go to be used by a project. It supports either major and minor (e.g 1.18) or major, minor and patch (e.g 1.18.7) tags. If the file contains only major and minor (e.g. 1.18) tags, the action will follow the above-mentioned approach.