Files
mantrae/.goreleaser.yaml
2025-12-14 11:05:01 +01:00

134 lines
2.8 KiB
YAML

# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
project_name: mantrae
report_sizes: true
pro: false
before:
hooks:
- go fmt ./...
- go vet ./...
- go mod tidy
- go mod verify
builds:
- id: server
main: ./server/cmd/
binary: mantrae
env: [CGO_ENABLED=0]
ldflags:
- -s -w
- -X github.com/mizuchilabs/mantrae/pkg/meta.Version={{.Version}}
- -X github.com/mizuchilabs/mantrae/pkg/meta.Commit={{.Commit}}
- -X github.com/mizuchilabs/mantrae/pkg/meta.Date={{.Date}}
goos:
- linux
- darwin
# - windows # too much too handle for gh runner :/
goarch:
- amd64
- arm64
- id: agent
main: ./agent/cmd/
binary: mantrae_agent
env: [CGO_ENABLED=0]
ldflags:
- -s -w
- -X github.com/mizuchilabs/mantrae/pkg/meta.Version={{.Version}}
- -X github.com/mizuchilabs/mantrae/pkg/meta.Commit={{.Commit}}
- -X github.com/mizuchilabs/mantrae/pkg/meta.Date={{.Date}}
goos:
- linux
goarch:
- amd64
- arm64
kos:
- id: server
build: server
main: ./server/cmd/
base_image: alpine
repositories: [ghcr.io/mizuchilabs/mantrae]
bare: true
preserve_import_paths: false
tags:
- "{{.Version}}"
- latest
platforms:
- linux/amd64
- linux/arm64
- id: agent
build: agent
main: ./agent/cmd/
base_image: alpine
repositories: [ghcr.io/mizuchilabs/mantrae-agent]
bare: true
preserve_import_paths: false
tags:
- "{{.Version}}"
- latest
platforms:
- linux/amd64
- linux/arm64
sboms:
- cmd: syft
documents:
- "{{ .Binary }}_{{ .Os }}_{{ .Arch }}.sbom.json"
args: ["$artifact", "--output", "cyclonedx-json=$document"]
artifacts: binary
disable: false
upx:
- enabled: true
lzma: true
compress: best
source:
enabled: true
release:
draft: false
replace_existing_draft: true
replace_existing_artifacts: true
mode: keep-existing
archives:
- formats: ["binary"]
snapshot:
version_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
include:
- "^feat:"
- "^fix:"
- "^sec:"
- "^docs:"
- "^wip:"
groups:
- title: "🚀 Features"
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: "🔒 Security"
regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$'
order: 1
- title: "🐛 Bug fixes"
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 2
- title: "📚 Documentation"
regexp: '^.*?docs(\([[:word:]]+\))??!?:.+$'
order: 3
- title: "🚧 Work in progress"
regexp: '^.*?wip(\([[:word:]]+\))??!?:.+$'
order: 4
- title: "🏷️ Other changes"
regexp: '^.*?chore(\([[:word:]]+\))??!?:.+$'
order: 5
- title: Misc
order: 999