Skip to content

Commit a2e68c9

Browse files
committed
fix: 修复编译的action版本问题
1 parent 63134c8 commit a2e68c9

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ jobs:
77
test:
88
strategy:
99
matrix:
10-
go: [ '1.22.x' ]
1110
os: [ ubuntu-latest ]
1211
runs-on: ${{ matrix.os }}
1312
steps:
@@ -16,7 +15,8 @@ jobs:
1615
- name: Setup Go
1716
uses: actions/setup-go@v6
1817
with:
19-
go-version: ${{ matrix.go }}
18+
go-version-file: go.mod
19+
check-latest: true
2020
- name: Test
2121
# 移除 -coverprofile 参数以避免在某些 Go 版本/环境中触发 `go tool covdata` 错误
2222
run: go test ./...

.github/workflows/main.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ jobs:
2020
- name: Set up Go
2121
uses: actions/setup-go@v6
2222
with:
23-
go-version: 'stable'
23+
go-version-file: go.mod
24+
check-latest: true
2425

2526
- name: Build and Test on Default Platform
2627
run: |
@@ -49,7 +50,8 @@ jobs:
4950
- name: Set up Go
5051
uses: actions/setup-go@v6
5152
with:
52-
go-version: 'stable'
53+
go-version-file: go.mod
54+
check-latest: true
5355

5456
- name: Build and Release
5557
run: |

0 commit comments

Comments
 (0)