1- # This is an example .goreleaser.yml file with some sensible defaults.
2- # Make sure to check the documentation at https://goreleaser.com
3-
4- # The lines bellow are called `modelines`. See `:help modeline`
5- # Feel free to remove those if you don't want/need to use them.
6- # yaml-language-server: $schema=https://goreleaser.com/static/schema.json
7- # vim: set ts=2 sw=2 tw=0 fo=cnqoj
1+ # .goreleaser.yaml
2+ version : 2
3+ env :
4+ - GO111MODULE=on
85
96before :
107 hooks :
11- # You may remove this if you don't use go modules.
128 - go mod tidy
13- # you may remove this if you don't need go generate
149 - go generate ./...
1510
11+ snapshot :
12+ version_template : " {{ incpatch .Version }}-next"
13+
1614builds :
17- - env :
18- - CGO_ENABLED=0
19- goos :
20- - linux
21- - darwin
22- - windows
23- goarch :
24- - amd64
25- dir : ./cmd
26- id : " ip_scanner"
15+ - main : ./cmd/ip_scanner
16+ id : ip_scanner
2717 binary : ip_scanner
28- main : ./ip_scanner
29-
18+ env :
19+ - CGO_ENABLED=0
20+ targets :
21+ - windows_amd64
22+ - linux_amd64
23+ - darwin_amd64
24+ - darwin_arm64
25+
3026 - main : ./cmd/cloudflare
31- id : " cloudflare"
27+ id : cloudflare
3228 binary : cloudflare
33- goos :
34- - linux
35- - darwin
36- - windows
37- goarch :
38- - amd64
29+ env :
30+ - CGO_ENABLED=0
31+ targets :
32+ - windows_amd64
33+ - linux_amd64
34+ - darwin_amd64
35+ - darwin_arm64
3936
4037 - main : ./cmd/fetch_ip_ranges
41- id : " fetch_ip_ranges"
38+ id : fetch_ip_ranges
4239 binary : fetch_ip_ranges
43- goos :
44- - linux
45- - darwin
46- - windows
47- goarch :
48- - amd64
40+ env :
41+ - CGO_ENABLED=0
42+ targets :
43+ - windows_amd64
44+ - linux_amd64
45+ - darwin_amd64
46+ - darwin_arm64
4947
5048 - main : ./cmd/google_translate
51- id : " google_translate"
49+ id : google_translate
5250 binary : google_translate
53- goos :
54- - linux
55- - darwin
56- - windows
57- goarch :
58- - amd64
51+ env :
52+ - CGO_ENABLED=0
53+ targets :
54+ - windows_amd64
55+ - linux_amd64
56+ - darwin_amd64
57+ - darwin_arm64
5958
6059archives :
6160 - format : tar.gz
62- # this name template makes the OS and Arch compatible with the results of `uname`.
6361 name_template : >-
6462 {{ .ProjectName }}_
6563 {{- title .Os }}_
6664 {{- if eq .Arch "amd64" }}x86_64
6765 {{- else if eq .Arch "386" }}i386
6866 {{- else }}{{ .Arch }}{{ end }}
6967 {{- if .Arm }}v{{ .Arm }}{{ end }}
70- # use zip for windows archives
7168 format_overrides :
7269 - goos : windows
7370 format : zip
@@ -77,9 +74,99 @@ archives:
7774 - configs/*
7875 - data/*
7976
77+ checksum :
78+ name_template : " checksums.txt"
79+
8080changelog :
81- sort : asc
81+ sort : asc # 按提交时间升序排序,最早的提交显示在最前面
82+ use : github
8283 filters :
8384 exclude :
84- - " ^docs:"
85- - " ^test:"
85+ - " ^test(:|\\ ()"
86+ - " merge conflict"
87+ - " Merge (pull request|remote-tracking branch|branch)"
88+ - " go mod tidy"
89+ - " ^更新文件"
90+ - " ^测试(:|\\ ()"
91+
92+ groups :
93+ # feat(UI): 新增用户登录界面、新增: 实现用户认证功能。
94+ - title : " New Features" # “新功能”
95+ regexp : ' ^.*?(feat|功能|新增|feature)(\(.+\))??!?[-:\s].+$'
96+ order : 100 # 排序优先级
97+
98+
99+ # fix: 修复UI组件加载延迟问题
100+ - title : " Bug fixes" # “Bug 修复”
101+ regexp : ' ^.*?(fix|修复|bug|错误|bugfix)(\(.+\))??!?[-:\s].+$'
102+ order : 200
103+
104+ # sec: 修复 XSS 漏洞,增强安全策略。
105+ - title : " Security updates" # “安全更新”
106+ regexp : ' ^.*?(sec|安全|漏洞|security)(\(.+\))??!?[-:\s].+$'
107+ order : 300
108+
109+
110+ # deps: 更新依赖库版本,提升稳定性。
111+ - title : " Dependency updates" # “依赖更新”
112+ regexp : ' ^.*?(deps|依赖|dependency)(\(.+\))??!?[-:\s].+$'
113+ order : 400
114+
115+
116+ # docs: 更新API使用说明,添加示例代码。
117+ - title : " Documentation updates" # “文档更新”
118+ regexp : ' ^.*?(docs?|文档|说明|documentation|注释)(\(.+\))??!?[-:\s].+$'
119+ order : 500
120+
121+
122+ # i18n: 添加西班牙语翻译,完善国际化支持。
123+ - title : " Translation updates" # “翻译更新”
124+ regexp : ' ^.*?(i18n|翻译|localization|国际化|本地化)(\(.+\))??!?[-:\s].+$'
125+ order : 600
126+
127+
128+ # optimization: 优化用户登录流程,减少加载时间。
129+ - title : " Code Optimization" # “代码优化”
130+ regexp : ' ^.*?(optimization|优化|性能|代码|performance|refactor)(\(.+\))??!?[-:\s].+$'
131+ order : 700
132+
133+
134+ # config: 更新环境变量配置文件。
135+ - title : " Config updates" # “配置更新”
136+ regexp : ' ^.*?(config|配置|configuration)(\(.+\))??!?[-:\s].+$'
137+ order : 800
138+
139+
140+ # ci(build): 添加持续集成任务,自动构建和发布。
141+ - title : " Build process updates" # “构建过程更新”
142+ regexp : ' ^.*?(build|ci|构建|持续集成)(\(.+\))??!?[-:\s].+$'
143+ order : 900
144+
145+
146+ # test: 增加单元测试用例,覆盖率提升到 85%。
147+ - title : " Test-related changes" # “测试相关变更”
148+ regexp : ' ^.*?(test|测试|单元测试|集成测试)(\(.+\))??!?[-:\s].+$'
149+ order : 950
150+
151+
152+ # chore: 更新项目文档索引,整理文件结构。
153+ - title : " Other work" # “其他工作”
154+ order : 9999
155+
156+
157+ release :
158+ name_template : " v{{ .Version }} {{.TagSubject}}"
159+
160+ replace_existing_artifacts : true
161+ mode : replace
162+
163+ header : |
164+
165+ **Latest Update:**
166+
167+ > {{.TagContents}}
168+
169+ Released in {{ .CommitDate }}
170+
171+ footer : |
172+ **Full Changelog**: https://github.com/sinspired/ip-scanner/compare/{{ .PreviousTag }}...{{ if .IsNightly }}nightly{{ else }}{{ .Tag }}{{ end }}
0 commit comments