Skip to content

Commit 076c06f

Browse files
committed
ci: update GitHub Actions configurations for Go projects
- Update CodeQL action from version 2 to version 3 in `.github/workflows/codeql.yml` - Change the step name from "Checkout" to "Checkout repository" in `.github/workflows/goreleaser.yml` - Modify the Go version setup from 1.17 to using a version file and checking the latest in `.github/workflows/goreleaser.yml` - Adjust the GoReleaser arguments from `release --rm-dist` to `release --clean` in `.github/workflows/goreleaser.yml` - Upgrade the golangci-lint action from version 3 to version 4 in `.github/workflows/lint.yml` - Expand the Go version range from `[1.20, 1.21]` to `[1.20, 1.21, 1.22]` in `.github/workflows/lint.yml` and `.github/workflows/testing.yml` - Update the codecov action from version 3 to version 4 in `.github/workflows/testing.yml` Signed-off-by: appleboy <appleboy.tw@gmail.com>
1 parent 5c9a349 commit 076c06f

4 files changed

Lines changed: 11 additions & 9 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ jobs:
5151
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5252

5353
- name: Perform CodeQL Analysis
54-
uses: github/codeql-action/analyze@v2
54+
uses: github/codeql-action/analyze@v3

.github/workflows/goreleaser.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,22 @@ jobs:
1212
goreleaser:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- name: Checkout
15+
- name: Checkout repository
1616
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
19-
- name: Set up Go
19+
20+
- name: Setup go
2021
uses: actions/setup-go@v5
2122
with:
22-
go-version: 1.17
23+
go-version-file: go.mod
24+
check-latest: true
2325
- name: Run GoReleaser
2426
uses: goreleaser/goreleaser-action@v5
2527
with:
2628
# either 'goreleaser' (default) or 'goreleaser-pro'
2729
distribution: goreleaser
2830
version: latest
29-
args: release --rm-dist
31+
args: release --clean
3032
env:
3133
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
strategy:
77
matrix:
88
os: [ubuntu-latest]
9-
go: ["1.20", 1.21]
9+
go: ["1.20", 1.21, 1.22]
1010
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
1111
runs-on: ${{ matrix.os }}
1212

@@ -26,7 +26,7 @@ jobs:
2626
ref: ${{ github.ref }}
2727

2828
- name: golangci-lint
29-
uses: golangci/golangci-lint-action@v3
29+
uses: golangci/golangci-lint-action@v4
3030
with:
3131
version: latest
3232
args: --verbose --timeout 10m

.github/workflows/testing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
os: [ubuntu-latest]
16-
go: [1.19, "1.20", 1.21]
16+
go: [1.19, "1.20", 1.21, 1.22]
1717
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
1818
runs-on: ${{ matrix.os }}
1919

@@ -53,4 +53,4 @@ jobs:
5353
go test -v -covermode=atomic -coverprofile=coverage.out ./...
5454
5555
- name: Upload coverage to Codecov
56-
uses: codecov/codecov-action@v3
56+
uses: codecov/codecov-action@v4

0 commit comments

Comments
 (0)