Skip to content

Commit bc4f86d

Browse files
committed
ci: update GitHub Actions configurations
- Update CodeQL action to version 3 in `.github/workflows/codeql.yml` - Update `golangci/golangci-lint-action` to version 4 in `.github/workflows/go.yml` - Change the name of the checkout step in `.github/workflows/goreleaser.yml` Signed-off-by: appleboy <[email protected]>
1 parent eb65916 commit bc4f86d

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

.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/go.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,25 @@ jobs:
1212
lint:
1313
runs-on: ubuntu-latest
1414
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
1520
- name: Setup go
1621
uses: actions/setup-go@v5
1722
with:
18-
go-version: "^1"
19-
- name: Checkout repository
20-
uses: actions/checkout@v4
23+
go-version-file: go.mod
24+
check-latest: true
2125
- name: Setup golangci-lint
22-
uses: golangci/golangci-lint-action@v3
26+
uses: golangci/golangci-lint-action@v4
2327
with:
2428
args: --verbose
2529
test:
2630
strategy:
2731
matrix:
2832
os: [ubuntu-latest]
29-
go: [1.18, 1.19, "1.20", 1.21]
33+
go: [1.18, 1.19, "1.20", 1.21, 1.22]
3034
include:
3135
- os: ubuntu-latest
3236
go-build: ~/.cache/go-build
@@ -48,7 +52,7 @@ jobs:
4852
with:
4953
ref: ${{ github.ref }}
5054

51-
- uses: actions/cache@v3
55+
- uses: actions/cache@v4
5256
with:
5357
path: |
5458
${{ matrix.go-build }}
@@ -61,6 +65,6 @@ jobs:
6165
go test -v -covermode=atomic -coverprofile=coverage.out
6266
6367
- name: Upload coverage to Codecov
64-
uses: codecov/codecov-action@v3
68+
uses: codecov/codecov-action@v4
6569
with:
6670
flags: ${{ matrix.os }},go-${{ matrix.go }}

.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
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 }}

0 commit comments

Comments
 (0)