diff --git a/.github/workflows/.goreleaser.yml b/.github/workflows/.goreleaser.yml index 3fcec742..c584f180 100644 --- a/.github/workflows/.goreleaser.yml +++ b/.github/workflows/.goreleaser.yml @@ -8,7 +8,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 + with: + # we have to fetch all history to be able to generate the release note. c.f. https://goreleaser.com/ci/actions/. + fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v2 with: @@ -18,6 +21,6 @@ jobs: with: distribution: goreleaser version: latest - args: release --rm-dist --skip-announce + args: release --clean --skip-announce env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index d2a34637..a925a587 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -31,13 +31,11 @@ archives: id: my-archive builds: - my-build - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" - replacements: - linux: Linux - darwin: Darwin - freebsd: FreeBSD - 386: i386 - amd64: x86_64 + name_template: >- + {{.ProjectName}}_{{.Version}}_{{.Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} files: - LICENSE - README.md @@ -69,6 +67,10 @@ nfpms: package_name: dataplaneapi builds: - my-build + file_name_template: >- + {{.ProjectName}}_{{.Version}}_{{.Os }}_ + {{- if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} vendor: HAProxy Technologies homepage: https://github.com/haproxytech/dataplaneapi maintainer: Marko Juraga