Skip to content

Commit d94bbbb

Browse files
committed
BUG/MINOR: fix go releaser
1 parent 428a112 commit d94bbbb

File tree

2 files changed

+68
-2
lines changed

2 files changed

+68
-2
lines changed

.github/workflows/.goreleaser.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
go-version-file: "go.mod"
1919
check-latest: true
2020
- name: Run GoReleaser
21-
uses: goreleaser/goreleaser-action@v4
21+
uses: goreleaser/goreleaser-action@v6
2222
with:
2323
distribution: goreleaser
24-
version: 1.17.1
24+
version: 6.4.0
2525
args: release --clean
2626
env:
2727
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Copyright 2019 HAProxy Technologies LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http:#www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
before:
15+
hooks:
16+
- go mod tidy
17+
builds:
18+
- env:
19+
- CGO_ENABLED=0
20+
binary: haproxy-unified-gateway
21+
id: my-build
22+
main: ./cmd/controller
23+
goos:
24+
- linux
25+
- darwin
26+
- freebsd
27+
goarch:
28+
- "386"
29+
- amd64
30+
- arm
31+
- arm64
32+
- ppc64le
33+
- s390x
34+
archives:
35+
- name_template: |-
36+
{{- $prettyOS := .Os -}}
37+
{{- if eq $prettyOS "darwin" -}}
38+
{{- $prettyOS = "Darwin" -}}
39+
{{- else if eq $prettyOS "linux" -}}
40+
{{- $prettyOS = "Linux" -}}
41+
{{- else if eq $prettyOS "freebsd" -}}
42+
{{- $prettyOS = "FreeBSD" -}}
43+
{{- end -}}
44+
45+
{{- $prettyArch := .Arch -}}
46+
{{- if eq $prettyArch "386" -}}
47+
{{- $prettyArch = "i386" -}}
48+
{{- else if eq $prettyArch "amd64" -}}
49+
{{- $prettyArch = "x86_64" -}}
50+
{{- end -}}
51+
{{.Binary}}_{{.Version}}_{{$prettyOS}}_{{$prettyArch}}
52+
checksum:
53+
name_template: 'checksums.txt'
54+
changelog:
55+
sort: asc
56+
use: git
57+
snapshot:
58+
name_template: "{{ .Tag }}-next"
59+
release:
60+
draft: false
61+
header: |
62+
## Release Notes
63+
HAProxy Unified Gateway {{.Tag}} {{.ShortCommit}}
64+
65+
Build date: {{.Date}}
66+
name_template: "HAProxy Unified Gateway v{{.Version}}"

0 commit comments

Comments
 (0)