From c051da803be33ca0863aa386e9b14f809fec2555 Mon Sep 17 00:00:00 2001 From: yxsi Date: Tue, 20 Aug 2024 09:05:55 +0800 Subject: [PATCH] fix goreleaser.yaml --- .goreleaser.yaml | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index ed840bd..24926a3 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,3 +1,5 @@ +version: 2 + builds: - env: - CGO_ENABLED=0 @@ -9,17 +11,24 @@ builds: - amd64 - "386" - arm + - arm64 + goarm: + - 6 + - 7 archives: - - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 + - format: tar.gz + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else if eq .Arch "arm64" }}arm64 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} checksum: name_template: 'checksums.txt' snapshot: - name_template: "{{ incpatch .Version }}-next" + version_template: "{{ incpatch .Version }}-next" changelog: sort: asc filters: @@ -50,11 +59,14 @@ nfpms: # Keys should be valid GOOSs or GOARCHs. # Values are the respective replacements. # Default is empty. - replacements: - amd64: 64-bit - 386: 32-bit - darwin: macOS - linux: Tux + file_name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}64-bit + {{- else if eq .Arch "386" }}32-bit + {{- else if eq .Arch "arm64" }}arm64 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} # Your app's vendor. # Default is empty.