Skip to content

Commit 3f8744f

Browse files
committed
chore: update GitHub Actions versions and step names
- Update the `actions/checkout` version to `v4` - Update the `golangci/golangci-lint-action` version to `v4` - Update the `actions/cache` version to `v4` - Update the `codecov/codecov-action` version to `v4` - Change the name of the step from `Checkout` to `Checkout repository` in `goreleaser.yml` Signed-off-by: appleboy <[email protected]>
1 parent 21b44a5 commit 3f8744f

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

.github/workflows/go.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ jobs:
1212
lint:
1313
runs-on: ubuntu-latest
1414
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
1518
- name: Setup go
1619
uses: actions/setup-go@v5
1720
with:
18-
go-version: "^1"
19-
- name: Checkout repository
20-
uses: actions/checkout@v4
21+
go-version-file: "go.mod"
2122
- name: Setup golangci-lint
22-
uses: golangci/golangci-lint-action@v3
23+
uses: golangci/golangci-lint-action@v4
2324
with:
2425
args: --verbose
2526
test:
@@ -48,7 +49,7 @@ jobs:
4849
with:
4950
ref: ${{ github.ref }}
5051

51-
- uses: actions/cache@v3
52+
- uses: actions/cache@v4
5253
with:
5354
path: |
5455
${{ matrix.go-build }}
@@ -61,6 +62,6 @@ jobs:
6162
go test -v -covermode=atomic -coverprofile=coverage.out
6263
6364
- name: Upload coverage to Codecov
64-
uses: codecov/codecov-action@v3
65+
uses: codecov/codecov-action@v4
6566
with:
6667
flags: ${{ matrix.os }},go-${{ matrix.go }}

.github/workflows/goreleaser.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ jobs:
1212
goreleaser:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- name: Checkout
15+
- name: Checkout repository
1616
uses: actions/checkout@v4
17-
with:
18-
fetch-depth: 0
19-
- name: Set up Go
17+
18+
- name: Setup go
2019
uses: actions/setup-go@v5
2120
with:
22-
go-version: "^1"
21+
go-version-file: "go.mod"
22+
2323
- name: Run GoReleaser
2424
uses: goreleaser/goreleaser-action@v5
2525
with:
2626
# either 'goreleaser' (default) or 'goreleaser-pro'
2727
distribution: goreleaser
2828
version: latest
29-
args: release --rm-dist
29+
args: release --clean
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)