-
Notifications
You must be signed in to change notification settings - Fork 112
/
.goreleaser.yml
50 lines (45 loc) · 1.38 KB
/
.goreleaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
project_name: osdctl
builds:
- env:
- CGO_ENABLED=0
- "GO111MODULE=on" # make sure to use go modules
- "GOFLAGS=-mod=readonly -trimpath" # trimpath helps with producing verifiable binaries
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ldflags:
# the following line will inject the current git tag in the binary during the build process.
# .Version are template variables that will be set during the GoReleaser run
# The "-X" go flag injects the strings into the two global variables GitCommit and Version
# See also: https://pkg.go.dev/cmd/link
- -s
- -w
- -X github.com/openshift/osdctl/pkg/utils.Version={{.Version}}
- "-extldflags=-zrelro" # binary hardening: For further explanation look here: https://www.redhat.com/en/blog/hardening-elf-binaries-using-relocation-read-only-relro
- "-extldflags=-znow"
archives:
# https://goreleaser.com/deprecations/#archivesreplacements
- name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end}}
checksum:
name_template: 'sha256sum.txt'
algorithm: sha256
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^test:'
release:
github:
owner: "openshift"
name: "osdctl"
prerelease: auto