forked from mt-sre/addon-metadata-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
72 lines (72 loc) · 1.8 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
# GoReleaser docs: https://goreleaser.com/intro/
# This is used to build the mtcli binary upon pushing a tag.
# When CGO_ENABLED=1 we can't cross compile, only targeting Linux.
# Tag needs to respect Semver: https://semver.org/
# Validate config with: $ goreleaser check
project_name: mtcli
builds:
- id: mtcli-gcc
env:
- CGO_ENABLED=1
- GO111MODULE=on
# required by opm to extract sql-based catalog
- CGO_CFLAGS=-DSQLITE_ENABLE_JSON1
- CC=gcc
goos:
- linux
goarch:
- amd64
main: &main ./cmd/mtcli
ldflags: &flags
- -s -w
- -X 'github.com/mt-sre/addon-metadata-operator/internal/cli.version={{.Version}}'
- -X 'github.com/mt-sre/addon-metadata-operator/internal/cli.commit={{.Commit}}'
- -X 'github.com/mt-sre/addon-metadata-operator/internal/cli.date={{.Date}}'
- -X 'github.com/mt-sre/addon-metadata-operator/internal/cli.builtBy=goreleaser'
- id: mtcli-o64-clang
env:
- CGO_ENABLED=1
- GO111MODULE=on
# required by opm to extract sql-based catalog
- GO_CFLAGS=-DSQLITE_ENABLE_JSON1
- CC=o64-clang
goos:
- darwin
goarch:
- amd64
main: *main
ldflags: *flags
archives:
- id: mtcli
name_template: >-
{{- .ProjectName }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end -}}
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
use: github
groups:
- title: Breaking
regexp: "^.*(fix|feat)[(\\w)]*!:+.*$"
order: 0
- title: Changes
regexp: "^.*feat[(\\w)]*:+.*$"
order: 10
- title: Bugfixes
regexp: "^.*fix[(\\w)]*:+.*$"
order: 20
- title: Trivial
order: 999
filters:
exclude:
- Merge pull request
- "^docs:"
- "^test:"