Skip to content

Commit 3f9a54c

Browse files
committed
ci: refine Go version handling in CI workflows
- Update Go version syntax from single quotes to double quotes in GitHub Actions workflows - Add Go version 1.20 and update the Go version range to include 1.21 in the test matrix - Remove unnecessary newlines in the GoReleaser GitHub Action workflow - Standardize Go version specification to use semantic versioning prefix `^1` in GoReleaser workflow Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent af10a72 commit 3f9a54c

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

.github/workflows/go.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- name: Setup go
99
uses: actions/setup-go@v5
1010
with:
11-
go-version: '^1'
11+
go-version: "^1"
1212
- name: Checkout repository
1313
uses: actions/checkout@v3
1414
- name: Setup golangci-lint
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
matrix:
2424
os: [ubuntu-latest]
25-
go: [1.17, 1.18, 1.19]
25+
go: [1.18, 1.19, "1.20", 1.21]
2626
include:
2727
- os: ubuntu-latest
2828
go-build: ~/.cache/go-build

.github/workflows/goreleaser.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Goreleaser
33
on:
44
push:
55
tags:
6-
- '*'
6+
- "*"
77

88
permissions:
99
contents: write
@@ -12,18 +12,15 @@ jobs:
1212
goreleaser:
1313
runs-on: ubuntu-latest
1414
steps:
15-
-
16-
name: Checkout
15+
- name: Checkout
1716
uses: actions/checkout@v3
1817
with:
1918
fetch-depth: 0
20-
-
21-
name: Set up Go
19+
- name: Set up Go
2220
uses: actions/setup-go@v5
2321
with:
24-
go-version: 1.17
25-
-
26-
name: Run GoReleaser
22+
go-version: "^1"
23+
- name: Run GoReleaser
2724
uses: goreleaser/goreleaser-action@v4
2825
with:
2926
# either 'goreleaser' (default) or 'goreleaser-pro'

0 commit comments

Comments
 (0)