This repository has been archived by the owner on May 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.goreleaser.yml
105 lines (94 loc) · 2.47 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Global environment variables for builds.
env:
- CGO_ENABLED=0
- GO111MODULE=on
- GOPROXY=https://goproxy.io|direct
- REPO=github.com/flomesh-io/ErieCanal
# Hooks to run before any build is run.
before:
hooks:
- go version | grep --quiet "go1\.19" || echo "Go binary version must be 1.19"
- go mod download
# Binary builds.
builds:
# erie-canal build steps
- id: erie-canal
main: ./cli
binary: erie-canal
mod_timestamp: "{{ .CommitTimestamp }}"
asmflags: &build-asmflags
- all=-trimpath={{ .Env.PWD }}
gcflags: &build-gcflags
- all=-trimpath={{ .Env.PWD }}
ldflags: &build-ldflags
- -X {{ .Env.REPO }}/pkg/version.Version={{ .Env.SIMPLE_VERSION }}
- -X {{ .Env.REPO }}/pkg/version.GitVersion={{ .Env.GIT_VERSION }}
- -X {{ .Env.REPO }}/pkg/version.GitCommit={{ .Env.GIT_COMMIT }}
- -X {{ .Env.REPO }}/pkg/version.KubernetesVersion={{ .Env.K8S_VERSION }}
- -X {{ .Env.REPO }}/pkg/version.ImageVersion={{ .Env.APP_VERSION }}
- -X {{ .Env.REPO }}/pkg/version.BuildDate={{ .Env.BUILD_DATE }}
- -s -w
goos:
- darwin
- windows
- linux
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64
# Use most recent tag and short commit for snapshot version.
snapshot:
name_template: "{{ .Env.GIT_VERSION }}"
archives:
- name_template: "erie-canal_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- none*
format_overrides:
- goos: windows
format: zip
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
checksum:
name_template: "checksums.txt"
algorithm: sha256
signs:
- artifacts: checksum
signature: "${artifact}.asc"
args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]
changelog:
skip: false
use: github
filters:
exclude:
- '^docs:'
- '^test:'
- '^revert:'
- '^chore:'
- typo
- Merge pull request
- Merge branch
- go mod tidy
groups:
- title: Features
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: 'Bug fixes'
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
- title: Others
order: 999
release:
prerelease: auto
extra_files:
- glob: ./etc/cert-manager-v1.7.2.yaml
header: |
## {{ .ProjectName }} {{ .Tag }}
Welcome to this new release!
footer: |
## Thanks!
Those were the changes on {{ .Tag }}!