Skip to content

Commit 42d05f7

Browse files
vgramermjuraga
authored andcommitted
BUILD/MINOR: goreleaser: fix deprecation and release notes generation
also use the format for package name as archive name Signed-off-by: Vincent Gramer <vgramer@haproxy.com>
1 parent 572e62d commit 42d05f7

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

.github/workflows/.goreleaser.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v3
12+
with:
13+
# we have to fetch all history to be able to generate the release note. c.f. https://goreleaser.com/ci/actions/.
14+
fetch-depth: 0
1215
- name: Set up Go
1316
uses: actions/setup-go@v2
1417
with:
@@ -18,6 +21,6 @@ jobs:
1821
with:
1922
distribution: goreleaser
2023
version: latest
21-
args: release --rm-dist --skip-announce
24+
args: release --clean --skip-announce
2225
env:
2326
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@ archives:
3131
id: my-archive
3232
builds:
3333
- my-build
34-
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
35-
replacements:
36-
linux: Linux
37-
darwin: Darwin
38-
freebsd: FreeBSD
39-
386: i386
40-
amd64: x86_64
34+
name_template: >-
35+
{{.ProjectName}}_{{.Version}}_{{.Os }}_
36+
{{- if eq .Arch "amd64" }}x86_64
37+
{{- else if eq .Arch "386" }}i386
38+
{{- else }}{{ .Arch }}{{ end }}
4139
files:
4240
- LICENSE
4341
- README.md
@@ -69,6 +67,10 @@ nfpms:
6967
package_name: dataplaneapi
7068
builds:
7169
- my-build
70+
file_name_template: >-
71+
{{.ProjectName}}_{{.Version}}_{{.Os }}_
72+
{{- if eq .Arch "386" }}i386
73+
{{- else }}{{ .Arch }}{{ end }}
7274
vendor: HAProxy Technologies
7375
homepage: https://github.com/haproxytech/dataplaneapi
7476
maintainer: Marko Juraga <mjuraga@haproxy.com>

0 commit comments

Comments
 (0)