Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This action sets up a Go environment for use in GitHub Actions by:

```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23'
Expand Down Expand Up @@ -67,7 +67,7 @@ To change the default behavior, use the `check-latest` input.

```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23'
Expand All @@ -80,7 +80,7 @@ steps:

```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '^1.23.1' # The Go version to download (if necessary) and use.
Expand All @@ -89,7 +89,7 @@ steps:

```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '>=1.22.0'
Expand All @@ -107,7 +107,7 @@ steps:
```yaml
# RC version
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.24.0-rc.1' # The Go version to download (if necessary) and use
Expand All @@ -117,7 +117,7 @@ steps:
```yaml
# Beta version
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23.0-beta.1' # The Go version to download (if necessary) and use
Expand All @@ -131,7 +131,7 @@ steps:
If `stable` is provided, action will get the latest stable version from the [go-versions](https://github.com/actions/go-versions/blob/main/versions-manifest.json) repository manifest.
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: 'stable' # Latest stable version
Expand All @@ -143,7 +143,7 @@ steps:
If `oldstable` is provided, when the current release is 1.23.x, the action will resolve version as 1.22.x, where x is the latest patch release.
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: 'oldstable' # Previous stable version
Expand All @@ -164,7 +164,7 @@ Automatically detect the Go version from your project's `go.mod` file:

```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
Expand All @@ -182,7 +182,7 @@ Use the Go version specified in your `go.work` file:

```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: 'go.work'
Expand All @@ -195,7 +195,7 @@ Read the Go version from a `.go-version` file:

```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: '.go-version'
Expand All @@ -208,7 +208,7 @@ Use the Go version from an [`.tool-versions`](https://asdf-vm.com/manage/configu

```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: '.tool-versions'
Expand All @@ -221,7 +221,7 @@ The action searches for version files relative to the repository root by default

```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: 'path/to/.go-version'
Expand All @@ -239,7 +239,7 @@ When `check-latest: true`, the action verifies if your cached Go version is the

```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23'
Expand All @@ -261,7 +261,7 @@ Default behavior: Searches for `go.sum` in the repository root and uses its hash

```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23'
Expand All @@ -280,7 +280,7 @@ For advanced scenarios, use `cache-dependency-path` to specify:
```yaml
# Example: Monorepo with multiple go.sum files
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23'
Expand All @@ -294,7 +294,7 @@ steps:
```yaml
# Example: Using glob patterns to match all go.sum files
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23'
Expand All @@ -306,7 +306,7 @@ steps:

```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23'
Expand All @@ -328,7 +328,7 @@ jobs:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
Expand Down
Loading