diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c82ba1d..25f94334 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,7 +38,7 @@ jobs: with: distribution: goreleaser version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e5a824d..61594f00 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,7 @@ jobs: with: distribution: goreleaser version: latest - args: build --snapshot --skip-validate --rm-dist + args: build --snapshot --skip-validate --clean - name: Tar binaries to preserve executable bit run: 'tar -cvf lefthook-binaries.tar --directory dist/ $(find dist/ -executable -type f -printf "%P\0" | xargs --null)' - name: Upload binaries as artifacts diff --git a/.goreleaser.yml b/.goreleaser.yml index 3d3afdd4..0ad481d8 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -20,21 +20,25 @@ archives: format: binary files: - none* - replacements: - windows: Windows - darwin: MacOS - linux: Linux - amd64: x86_64 + name_template: >- + {{ .ProjectName }}_ + {{- .Version }}_ + {{- if eq .Os "darwin" }}MacOS + {{- else }}{{ title .Os }}_{{ end }} + {{- if eq .Arch "amd64" }}x86_64 + {{- else }}{{ .Arch }}{{ end }} - id: lefthook-gz format: gz files: - none* - replacements: - windows: Windows - darwin: MacOS - linux: Linux - 386: i386 - amd64: x86_64 + name_template: >- + {{ .ProjectName }}_ + {{- .Version }}_ + {{- if eq .Os "darwin" }}MacOS + {{- else }}{{ title .Os }}{{ end }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} checksum: name_template: '{{ .ProjectName }}_checksums.txt' snapshot: