diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a7547f..217b0b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,6 +32,6 @@ jobs: with: distribution: goreleaser version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 93f324c..c3a890d 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -14,12 +14,16 @@ builds: ldflags: - -X main.Version={{.Version}} archives: -- replacements: - darwin: macOS - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 +- name_template: >- + {{- .ProjectName }}_ + {{- if eq .Os "darwin"}}macOS + {{- else if eq .Os "linux"}}Linux + {{- else if eq .Os "windows"}}Windows + {{- else }}{{ .Os }}{{ end }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end -}} universal_binaries: - replace: false checksum: diff --git a/releasing.md b/releasing.md index d81081c..0ebcfa3 100644 --- a/releasing.md +++ b/releasing.md @@ -24,7 +24,7 @@ $ git push origin v0.1.0 Then: ```bash -GITHUB_TOKEN=xxx goreleaser --rm-dist +GITHUB_TOKEN=xxx goreleaser --clean ``` ## Testing @@ -32,5 +32,5 @@ GITHUB_TOKEN=xxx goreleaser --rm-dist To test and verify changes to Go Releaser config, use the following: ```bash -goreleaser --snapshot --skip-publish --rm-dist +goreleaser --snapshot --skip=publish --clean ```