-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy path.goreleaser.yml
67 lines (60 loc) · 1.63 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
version: 2
project_name: "webstack-go"
builds:
- id: default
dir: . # 根目录
main: ./cmd/server # 指定 main 包的路径
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
archives:
- id: default
format: tar.gz
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- src: "config/*"
dst: "config"
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
changelog:
use: git
format: "{{.SHA}}: {{.Message}} (@{{.AuthorUsername}})"
sort: asc
filters:
exclude:
- '^docs(\(.*\))?:' # 排除以 "docs:" 或 "docs(readme):" 开头的提交
- '^chore(\(.*\))?:' # 排除以 "chore:" 或 "chore(ci):" 开头的提交
- '^test(\(.*\))?:' # 排除以 "test:" 或 "test(unit):" 开头的提交
groups:
- title: "New Features"
regexp: '^feat(\(.*\))?:' # 匹配 "feat:" 或 "feat(flow):"
- title: "Bug Fixes"
regexp: '^fix(\(.*\))?:' # 匹配 "fix:" 或 "fix(bug):"
- title: "Performance Improvements"
regexp: '^perf(\(.*\))?:' # 匹配 "perf:" 或 "perf(optimize):"
- title: "Code Refactoring"
regexp: '^refactor(\(.*\))?:'
- title: "Other Changes"
regexp: '^.*$' # 匹配所有其他提交
release:
draft: false
prerelease: false
mode: replace
git:
ignore_tags:
- alpha
- beta