Update .goreleaser.yml

This commit is contained in:
OopsUnix committed 2025-04-19 16:30:33 +08:00
1 parent 14d05bfa28
commit e528c708fc
1 file changed
+27 -15
+27 -15
View File
@@ -13,10 +13,11 @@ builds:
- windows
- linux
- darwin
- freebsd
goarch:
# - 386
- amd64
- "386"
- arm
# - arm
- arm64
flags:
- -trimpath
@@ -37,19 +38,30 @@ upx:
# brute: true
archives:
- format: binary
allow_different_binary_count: true
name_template: >-
{{- .ProjectName }}
{{- if eq .Os "darwin"}}_mac
{{- else if eq .Os "linux"}}
{{- else if eq .Os "windows"}}
{{- else }}_{{ .Os }}{{ end }}
{{- if eq .Arch "amd64" }}
{{- else if eq .Arch "386" }}32
{{- else }}_{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end -}}
-
format: binary
# format: tar.gz # 默认情况下,归档文件的格式
# format_overrides: # 根据目标操作系统覆盖默认的归档格式
# - goos: windows
# format: zip
allow_different_binary_count: true # 允许不同平台生成不同数量的二进制文件,避免 GoReleaser 报错
# name_template: >-
# {{- .ProjectName }}
# {{- if eq .Os "windows"}}_windows
# {{- else if eq .Os "linux"}}_linux
# {{- else if eq .Os "darwin"}}_darwin
# {{- else }}_{{ .Os }}{{ end }}
# {{- if eq .Arch "amd64" }}_amd64
# {{- else if eq .Arch "386" }}_386
# {{- else if eq .Arch "arm64" }}_arm64
# {{- else }}_{{ .Arch }}{{ end }}
# {{- if .Arm }}v{{ .Arm }}{{ end -}}
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
# name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
# files:
# - LICENSE*
# - README*
# - CHANGELOG*
checksum:
name_template: 'checksums.txt'