-
Notifications
You must be signed in to change notification settings - Fork 10
/
.goreleaser.yaml
122 lines (109 loc) · 2.82 KB
/
.goreleaser.yaml
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
project_name: fsm
# Global environment variables for builds.
env:
- CGO_ENABLED=0
- GO111MODULE=on
- BREWS_SKIP_UPLOAD={{ if and (index .Env "HOMEBREW_RELEASE_PAT") .Env.HOMEBREW_RELEASE_PAT }}false{{ else }}true{{ end }}
before:
hooks:
- go mod download
- make generate-cli-chart
builds:
# fsm build steps
- id: fsm
main: ./cmd/cli
binary: fsm
mod_timestamp: "{{ .CommitTimestamp }}"
ldflags: &build-ldflags
- -X github.com/flomesh-io/fsm/pkg/version.Version={{ .Env.VERSION }}
- -X github.com/flomesh-io/fsm/pkg/version.GitCommit={{ .FullCommit }}
- -X github.com/flomesh-io/fsm/pkg/version.BuildDate={{ .Now.Format "2006-01-02-15:04" }}
- -s
- -w
goos:
- darwin
- linux
goarch:
- amd64
- arm64
archives:
- id: tar-gz
format: tar.gz
name_template: >-
{{ .ProjectName }}_
{{- .Env.VERSION }}_
{{- .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
- id: zip
format: zip
name_template: >-
{{ .ProjectName }}_
{{- .Env.VERSION }}_
{{- .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
checksum:
name_template: "sha256sums.txt"
algorithm: sha256
changelog:
sort: asc
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
mode: replace
replace_existing_artifacts: true
header: |
## {{ tolower .ProjectName }} {{ .Tag }}
Welcome to this new release!
footer: |
## Thanks!
Those were the changes on {{ .Tag }}!
brews:
- repository:
owner: flomesh-io
name: homebrew-fsm
token: "{{ .Env.HOMEBREW_RELEASE_PAT }}"
ids:
- tar-gz
commit_author:
name: reaver-flomesh
email: [email protected]
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
directory: Formula
goarm: "7"
homepage: https://flomesh.io/fsm
description: Lightweight service mesh for Kubernetes East-West and North-South traffic management
license: Apache 2.0
test: |
system "#{bin}/fsm version"
dependencies:
- name: go
type: optional
- name: git
type: optional
skip_upload: "{{ .Env.BREWS_SKIP_UPLOAD }}"