From 88cbcd057aa9854062e07b0de23485dd6bef0257 Mon Sep 17 00:00:00 2001 From: appleboy Date: Sun, 24 Mar 2024 09:24:48 +0800 Subject: [PATCH] ci: update GitHub Actions workflows for Go projects - Update the `fetch-depth` value to `0` in the workflow for `go.yml` - Update the `golangci/golangci-lint-action` version from `v3` to `v4` in the workflow for `go.yml` - Change the step name from `Checkout` to `Checkout repository` in the workflow for `goreleaser.yml` - Update the `actions/setup-go` version to `v5` in the workflow for `goreleaser.yml` - Modify the `args` value to `release --clean` in the workflow for `goreleaser.yml` Signed-off-by: appleboy --- .github/workflows/go.yml | 3 +++ .github/workflows/goreleaser.yml | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 622531f..62bf91f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -14,6 +14,9 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup go uses: actions/setup-go@v5 with: diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index e245b7b..0392c49 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -12,11 +12,12 @@ 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-file: go.mod @@ -27,6 +28,6 @@ jobs: # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}