From c300a654eab8cbd66f3a4354a3c8c66e77e3f81a Mon Sep 17 00:00:00 2001 From: Timothy Date: Wed, 1 Nov 2023 20:51:56 +0800 Subject: [PATCH] update github actions --- .github/workflows/release.yml | 23 +++++++++-------------- .goreleaser.yaml | 7 +------ 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f9e14ea..3b07cfa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Auto Release on: push: tags: - - '*' + - "*" permissions: contents: write @@ -12,23 +12,18 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - - name: Checkout - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v2 + - name: Set up Go + uses: actions/setup-go@v4 with: - go-version: 1.17 - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + go-version: 1.20.3 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v4 with: - # either 'goreleaser' (default) or 'goreleaser-pro' - distribution: goreleaser version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0c5cedb..5ee5276 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -26,12 +26,7 @@ builds: ldflags: - -s -w -X main.Version={{.Tag}} archives: - - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 + - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" checksum: name_template: 'checksums.txt' snapshot: