Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add goreleaser file #17

Merged
merged 3 commits into from
Jan 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
before:
hooks:
- go mod tidy

builds:
- id: policy-reports
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
binary: policy-reports
flags:
- -trimpath
# ldflags:
# - -s -w -X github.com/kyverno/policy-reports/pkg/version.BuildVersion={{ .Version }}

kos:
- build: policy-reports
repository: ghcr.io/kyverno/policy-reports
tags:
- '{{.Tag}}'
- '{{ if not .Prerelease }}latest{{ end }}'
bare: true
preserve_import_paths: false
sbom: none
platforms:
- all

signs:
- cmd: cosign
certificate: '${artifact}.pem'
args:
- sign-blob
- --output-certificate=${certificate}
- --output-signature=${signature}
- ${artifact}
- --yes
artifacts: all
output: true

docker_signs:
- cmd: cosign
artifacts: all
output: true
args:
- sign
- ${artifact}
- --yes

# brews:
# - homepage: https://kyverno.github.io/policy-reports
# description: Declarative Kubernetes end-to-end testing.
# repository:
# owner: kyverno
# name: policy-reports
# branch: brew-{{.Version}}
# pull_request:
# enabled: true
# base:
# owner: kyverno
# name: policy-reports
# branch: main

archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}'

checksum:
name_template: checksums.txt

source:
enabled: true

sboms:
- artifacts: archive
- id: source
artifacts: source

snapshot:
name_template: '{{ incpatch .Version }}-next'

release:
prerelease: auto

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'