1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00
kyverno/.goreleaser.yml
gcp-cherry-pick-bot[bot] 61c6e839bf
fix: go releaser config (#11135) (#11136)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-13 06:41:25 +00:00

80 lines
1.5 KiB
YAML

version: 2
project_name: kyverno-cli
before:
hooks:
- go mod download
builds:
- id: kyverno-cli
# As mentioned in https://github.com/golang/go/issues/51831, to include build info, we should use go build <package>
# instead of go build main.go here.
# see https://goreleaser.com/customization/builds/
main: ./cmd/cli/kubectl-kyverno
binary: kyverno
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X github.com/kyverno/kyverno/pkg/version.BuildVersion={{.Version}}
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
- s390x
ignore:
- goos: darwin
goarch: s390x
- goos: windows
goarch: s390x
signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
certificate: '${artifact}.pem'
args:
- sign-blob
- --output-certificate=${certificate}
- --output-signature=${signature}
- ${artifact}
- --yes
artifacts: all
output: true
archives:
- id: kyverno-cli-archive
name_template: |-
kyverno-cli_{{ .Tag }}_{{ .Os }}_
{{- with .Arch -}}
{{- if eq . "amd64" -}}x86_64{{- else if eq . "386" -}}i386{{- else -}}{{- . -}}{{- end -}}
{{- end -}}
{{- with .Arm -}}
{{- if eq . "6" -}}hf{{- else -}}v{{- . -}}{{- end -}}
{{- end -}}
builds:
- kyverno-cli
format_overrides:
- goos: windows
format: zip
files: ["LICENSE"]
checksum:
name_template: checksums.txt
source:
enabled: true
release:
prerelease: auto
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- typo
- '^test:'