Skip to content

Commit 700b981

Browse files
committed
feat: Upgrade GitHub Actions to v4 for greater stability (#304)
* ci: Upgrade GitHub Actions to v4 for greater stability - Close #303 - Upgrade GitHub Actions to v4 in all workflows - Fix zipping and uploading of Linux arm64 assets in release workflow - Simplify and remove unnecessary steps in build workflow
1 parent 591b97c commit 700b981

4 files changed

Lines changed: 12 additions & 17 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,21 @@ jobs:
1818

1919
steps:
2020
- name: Set up Go ${{ matrix.goVer }}
21-
uses: actions/setup-go@v1
21+
uses: actions/setup-go@v4
2222
with:
2323
go-version: ${{ matrix.goVer }}
2424
id: go
2525

2626
- name: Check out code into the Go module directory
27-
uses: actions/checkout@v2
28-
29-
- name: Set Git to handle line endings consistently
30-
run: git config --global core.autocrlf false
27+
uses: actions/checkout@v4
3128

3229
- name: Format Check
3330
if: matrix.os != 'windows-latest'
3431
run: |
3532
diff -u <(echo -n) <(gofmt -d .)
3633
3734
- name: Get dependencies
38-
run: |
39-
go get -v -t -d ./...
40-
go get gopkg.in/check.v1
35+
run: go get -v ./...
4136

4237
- name: Build
4338
run: go build -v ./...

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Set Golang
14-
uses: actions/setup-go@v3
14+
uses: actions/setup-go@v4
1515
with:
1616
go-version: "1.21.x"
1717
- name: Checkout code
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919

2020
- name: Check spelling with custom config file
2121
uses: crate-ci/typos@master

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88

99
steps:
1010
- name: Checkout source
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212

1313
- name: Use Golang
14-
uses: actions/setup-go@v3
14+
uses: actions/setup-go@v4
1515
with:
1616
go-version: "1.21.x"
1717

.github/workflows/unittest.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- main
66
workflow_dispatch:
77

8-
name: unit tests
8+
name: Tests
99
jobs:
1010
test:
1111
strategy:
@@ -16,11 +16,11 @@ jobs:
1616
steps:
1717
- name: Install Go
1818
if: success()
19-
uses: actions/setup-go@v3
19+
uses: actions/setup-go@v4
2020
with:
2121
go-version: ${{ matrix.go-version }}
2222
- name: Checkout code
23-
uses: actions/checkout@v2
23+
uses: actions/checkout@v4
2424
- name: Run tests
2525
run: go test -v ./... -covermode=count
2626

@@ -29,11 +29,11 @@ jobs:
2929
steps:
3030
- name: Install Go
3131
if: success()
32-
uses: actions/setup-go@v3
32+
uses: actions/setup-go@v4
3333
with:
3434
go-version: "1.21.x"
3535
- name: Checkout code
36-
uses: actions/checkout@v2
36+
uses: actions/checkout@v4
3737
- name: Calc coverage
3838
run: |
3939
go test -v ./... -covermode=count -coverprofile=coverage.out

0 commit comments

Comments
 (0)