From 3f8744faa84296a07081f3b5206b122a592f0477 Mon Sep 17 00:00:00 2001 From: appleboy Date: Sat, 23 Mar 2024 08:46:14 +0800 Subject: [PATCH] chore: update GitHub Actions versions and step names - Update the `actions/checkout` version to `v4` - Update the `golangci/golangci-lint-action` version to `v4` - Update the `actions/cache` version to `v4` - Update the `codecov/codecov-action` version to `v4` - Change the name of the step from `Checkout` to `Checkout repository` in `goreleaser.yml` Signed-off-by: appleboy --- .github/workflows/go.yml | 13 +++++++------ .github/workflows/goreleaser.yml | 12 ++++++------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index f6a8530..3e048d3 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,14 +12,15 @@ jobs: lint: runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Setup go uses: actions/setup-go@v5 with: - go-version: "^1" - - name: Checkout repository - uses: actions/checkout@v4 + go-version-file: "go.mod" - name: Setup golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v4 with: args: --verbose test: @@ -48,7 +49,7 @@ jobs: with: ref: ${{ github.ref }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ${{ matrix.go-build }} @@ -61,6 +62,6 @@ jobs: go test -v -covermode=atomic -coverprofile=coverage.out - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: flags: ${{ matrix.os }},go-${{ matrix.go }} diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 98e3a69..c776b74 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -12,20 +12,20 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - name: Checkout + - name: Checkout repository uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Go + + - name: Setup go uses: actions/setup-go@v5 with: - go-version: "^1" + go-version-file: "go.mod" + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}