feat(all): update to go1.24+

This commit is contained in:
源文雨
2025-09-30 23:55:08 +08:00
parent 724e48f3e8
commit aa67d09ee1
25 changed files with 344 additions and 861 deletions

View File

@@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: "1.20"
go-version: "1.25"
- name: Check out code into the Go module directory
uses: actions/checkout@master

View File

@@ -30,7 +30,7 @@ jobs:
- name: Setup Go environment
uses: actions/setup-go@master
with:
go-version: '1.20'
go-version: '1.25'
- name: Cache downloaded module
uses: actions/cache@master
continue-on-error: true
@@ -45,6 +45,7 @@ jobs:
GOARCH: ${{ matrix.goarch }}
IS_PR: ${{ !!github.head_ref }}
run: |
go generate ./...
if [ $GOOS = "windows" ]; then export BINARY_SUFFIX="$BINARY_SUFFIX.exe"; fi
if $IS_PR ; then echo $PR_PROMPT; fi
export BINARY_NAME="$BINARY_PREFIX$GOOS_$GOARCH$BINARY_SUFFIX"

View File

@@ -26,7 +26,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: '1.20'
go-version: '1.25'
- name: Check out code into the Go module directory
uses: actions/checkout@v4
@@ -34,7 +34,9 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
- name: Tidy Modules
run: go mod tidy
run: |
go mod tidy
go generate ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@master

View File

@@ -8,13 +8,15 @@ jobs:
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: '1.20'
go-version: '1.25'
- name: Check out code into the Go module directory
uses: actions/checkout@master
- name: Tidy Modules
run: go mod tidy
run: |
go mod tidy
go generate ./...
- name: Run Lint
uses: golangci/golangci-lint-action@master

View File

@@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: '1.20'
go-version: '1.25'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master