Skip to content

Commit 01fec2f

Browse files
authored
CI: bump actions/setup-go to v6 & use go version in go.mod (#3510)
1 parent 84bf1a9 commit 01fec2f

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

.github/workflows/linter.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ jobs:
1919
if: github.repository == 'v2fly/v2ray-core'
2020
runs-on: ubuntu-latest
2121
steps:
22-
- name: Set up Go 1.x
23-
uses: actions/setup-go@v4
24-
with:
25-
go-version: ^1.21
26-
2722
- name: Checkout codebase
2823
uses: actions/checkout@v5
2924

25+
- name: Set up Go
26+
uses: actions/setup-go@v6
27+
with:
28+
go-version-file: ./go.mod
29+
cache-dependency-path: ./go.sum
30+
3031
- name: golangci-lint
3132
uses: golangci/golangci-lint-action@v8
3233
with:

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ jobs:
133133
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV
134134
135135
- name: Set up Go
136-
uses: actions/setup-go@v4
136+
uses: actions/setup-go@v6
137137
with:
138-
go-version: ^1.24
138+
go-version-file: ./go.mod
139+
cache-dependency-path: ./go.sum
139140

140141
- name: Get project dependencies
141142
run: go mod download
@@ -213,9 +214,10 @@ jobs:
213214
fetch-depth: 0
214215

215216
- name: Set up Go
216-
uses: actions/setup-go@v4
217+
uses: actions/setup-go@v6
217218
with:
218-
go-version: ^1.24
219+
go-version-file: ./go.mod
220+
cache-dependency-path: ./go.sum
219221

220222
- uses: actions/download-artifact@v5
221223
with:

.github/workflows/test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,17 @@ jobs:
2727
matrix:
2828
os: [windows-latest, ubuntu-latest, macos-latest]
2929
steps:
30-
- name: Set up Go 1.x
31-
uses: actions/setup-go@v4
32-
with:
33-
go-version: ^1.21
34-
3530
- name: Checkout codebase
3631
uses: actions/checkout@v5
3732
with:
3833
fetch-depth: 0
3934

35+
- name: Set up Go
36+
uses: actions/setup-go@v6
37+
with:
38+
go-version-file: ./go.mod
39+
cache-dependency-path: ./go.sum
40+
4041
- name: Check Go modules
4142
run: |
4243
go mod tidy

0 commit comments

Comments
 (0)