0
1
Fork 0

Compare commits

...

2 Commits

Author SHA1 Message Date
Masahiro Furudate 7d12e2b732 Add description about patch versions to README 2024-04-05 02:26:09 +09:00
Masahiro Furudate bdc649113d Fix README 2024-04-05 00:45:56 +09:00
1 changed files with 7 additions and 2 deletions

View File

@ -183,8 +183,13 @@ steps:
## Getting go version from the go.mod file
The `go-version-file` input accepts a path to a `go.mod` file or a `go.work` file that contains the version of Go to be
used by a project.
The `go-version-file` input accepts a path to a `go.mod` file or a `go.work` file that contains the version of Go to be used by a project.
The `go` directive in `go.mod` can specify a patch version or omit it altogether (e.g., `go 1.22.0` or `go 1.22`).
If a patch version is specified, that specific patch version will be used.
If no patch version is specified, it will search for the latest available patch version in the cache,
[versions-manifest.json](https://github.com/actions/go-versions/blob/main/versions-manifest.json), and the
[official Go language website](https://golang.org/dl/?mode=json&include=all), in that order.
If both the `go-version` and the `go-version-file` inputs are provided then the `go-version` input is used.
> The action will search for the `go.mod` file relative to the repository root