|
|
|
@ -24,22 +24,22 @@ It will first check the local cache for a version match. If version is not found
|
|
|
|
|
Matching by semver spec:
|
|
|
|
|
```yaml
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
|
with:
|
|
|
|
|
go-version: '^1.13.1' # The Go version to download (if necessary) and use.
|
|
|
|
|
- run: go version
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
|
with:
|
|
|
|
|
go-version: '^1.13.1' # The Go version to download (if necessary) and use.
|
|
|
|
|
- run: go version
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Matching an unstable pre-release:
|
|
|
|
|
```yaml
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
|
with:
|
|
|
|
|
stable: 'false'
|
|
|
|
|
go-version: '1.14.0-rc1' # The Go version to download (if necessary) and use.
|
|
|
|
|
- run: go version
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
|
with:
|
|
|
|
|
stable: 'false'
|
|
|
|
|
go-version: '1.14.0-rc1' # The Go version to download (if necessary) and use.
|
|
|
|
|
- run: go version
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# Usage
|
|
|
|
@ -49,11 +49,11 @@ See [action.yml](action.yml)
|
|
|
|
|
Basic:
|
|
|
|
|
```yaml
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
|
with:
|
|
|
|
|
go-version: '1.9.3' # The Go version to download (if necessary) and use.
|
|
|
|
|
- run: go run hello.go
|
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
|
with:
|
|
|
|
|
go-version: '1.9.3' # The Go version to download (if necessary) and use.
|
|
|
|
|
- run: go run hello.go
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Matrix Testing:
|
|
|
|
|