ci: refactor CI workflows and update actions

- Update GitHub Actions to use newer versions (checkout to v4, codeql-action to v3, setup-go to v5, goreleaser-action to v5, golangci-lint-action to v4, codecov-action to v4)
- Remove specific Go version pinning in favor of using the version specified in go.mod
- Enable checking for the latest Go version in setup-go action
- Replace `release --rm-dist` argument with `release --clean` in goreleaser action
- Reorder steps and remove redundant checkout step in testing workflow

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2024-04-02 14:10:03 +08:00
parent 2c5e17dd2e
commit f37c5b3557
4 changed files with 28 additions and 25 deletions
+6 -6
View File
@@ -14,14 +14,14 @@ jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: "^1.21"
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
fetch-depth: 0
go-version-file: go.mod
check-latest: true
- name: Build binary
run: |