Compare commits

...

3 Commits

Author SHA1 Message Date
HarithaVattikuti
4ab57d7ea2
Fix versions check failure (#479)
* Update to latest Go versions

* Updated versions

* Update test data

* Update test data
2024-05-10 11:25:20 -05:00
Masahiro Furudate
cdcb360436
Remove the description of the old go.mod specification (#458)
* Fix emoji rendering

* Fix quoting

* Remove the description of the old go.mod specification

* Remove the single quotes from `go-version-file`

* Fix README

* Add description about patch versions to README

* Revert "Remove the single quotes from `go-version-file`"

This reverts commit ca4321abee.
2024-04-18 08:33:57 -05:00
Andy Brody
99176a8f9a
Update README.md with V5 release notes (#459) 2024-04-15 09:19:11 -05:00
5 changed files with 30 additions and 19 deletions

View File

@ -71,7 +71,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
go: [1.17, 1.18, 1.19]
go: [1.20.14, 1.21.10, 1.22.3]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -91,7 +91,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go-version: [1.16, 1.17]
go-version: [1.20.14, 1.21]
steps:
- uses: actions/checkout@v4
- name: Setup Go and check latest
@ -115,7 +115,7 @@ jobs:
with:
go-version-file: __tests__/data/go.mod
- name: verify go
run: __tests__/verify-go.sh 1.14
run: __tests__/verify-go.sh 1.20.14
shell: bash
go-version-file-with-gowork:
@ -131,7 +131,7 @@ jobs:
with:
go-version-file: __tests__/data/go.work
- name: verify go
run: __tests__/verify-go.sh 1.19
run: __tests__/verify-go.sh 1.21
shell: bash
setup-versions-from-manifest:
@ -141,7 +141,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
go: [1.12.16, 1.13.11, 1.14.3]
go: [1.20.14, 1.21.10, 1.22.3]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -162,7 +162,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
go: [1.9, 1.8.6]
go: [1.20.14, 1.21]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -182,7 +182,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go-version: [1.16, 1.17]
go-version: [1.20.14, 1.21]
steps:
- uses: actions/checkout@v4
- name: Setup Go and check latest

View File

@ -8,6 +8,14 @@ This action sets up a go environment for use in actions by:
- Optionally downloading and caching a version of Go by version and adding to `PATH`.
- Registering problem matchers for error output.
# V5
The V5 edition of the action offers:
- Upgraded Node.js runtime from node16 to node20
See full release notes on the [releases page](https://github.com/actions/setup-go/releases).
# V4
The V4 edition of the action offers:
@ -65,6 +73,7 @@ steps:
> ```
>
> The recommendation is based on the YAML parser's behavior, which interprets non-wrapped values as numbers and, in the case of version 1.20, trims it down to 1.2, which may not be very obvious.
Matching an unstable pre-release:
```yaml
@ -182,11 +191,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. As the `go.mod` file contains only major and minor (e.g. 1.18) tags, the action will search for the
latest available patch version sequentially in the runner's directory with the cached tools, in
the [versions-manifest.json](https://github.com/actions/go-versions/blob/main/versions-manifest.json) file or at the go
servers.
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

View File

@ -1,6 +1,6 @@
module example.com/mymodule
go 1.14
go 1.20
require (
example.com/othermodule v1.2.3

View File

@ -1,3 +1,3 @@
go 1.19
go 1.21
use .