From 894d1fd08539b324d8dc81a3b6d5d2f389f5947b Mon Sep 17 00:00:00 2001 From: Rueian Date: Fri, 19 Apr 2024 19:00:38 +0800 Subject: [PATCH] ci: update goreleaser --- .github/workflows/release.yml | 2 +- .goreleaser.yml | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a2ffc3..ad2ae4e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: go-version: 1.21 - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v5 with: version: latest args: release --rm-dist diff --git a/.goreleaser.yml b/.goreleaser.yml index 11e44ad..8374d30 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -12,12 +12,13 @@ builds: ldflags: - -X main.Version={{.Tag}} archives: - - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 + - name_template: >- + {{- .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end -}} checksum: name_template: 'checksums.txt' snapshot: