-
Notifications
You must be signed in to change notification settings - Fork 2
/
.goreleaser.yml
52 lines (46 loc) · 1.51 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
51
52
# Global environment variables for builds.
env:
- GO111MODULE=on
- GOPROXY=https://proxy.golang.org|direct
- VERSION_PKG=github.com/operator-framework/helm-operator-plugins/internal/version
# Hooks to run before any build is run.
before:
hooks:
- go version | grep --quiet "go1\.17" || echo "Go binary version must be 1.17.x"
- go mod download
# Binary builds.
builds:
# operator-sdk build steps
- id: helm-operator
binary: helm-operator
mod_timestamp: "{{ .CommitTimestamp }}"
asmflags:
- all=-trimpath={{ dir .Env.PWD }}
gcflags:
- all=-trimpath={{ dir .Env.PWD }}
ldflags:
- -s
- -w
- -X {{ .Env.VERSION_PKG }}.ScaffoldVersion={{ .Env.SCAFFOLD_VERSION }}
- -X {{ .Env.VERSION_PKG }}.GitVersion={{ .Env.GIT_VERSION }}
- -X {{ .Env.VERSION_PKG }}.GitCommit={{ .Env.GIT_COMMIT }}
targets:
- darwin_amd64
- darwin_arm64
- linux_amd64
- linux_arm64
- linux_ppc64le
- linux_s390x
# Use most recent tag and short commit for snapshot version.
snapshot:
name_template: "{{ .Env.GIT_VERSION }}"
# We don't use archives, so skip creating them.
archives:
- format: binary
name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
checksum:
name_template: "checksums.txt"
signs:
- signature: "${artifact}.asc"
artifacts: checksum
args: ["--home", ".ci/gpg/keyring", "-u", "A20B5C7E", "--output", "${signature}", "--detach-sign", "${artifact}"]