File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # GoReleaser v1 配置文件
1+ # GoReleaser v2 配置文件
2+ version : 2
3+
24project_name : " {{ .Env.PROJECT_NAME }}"
35
46# 构建前钩子
@@ -37,6 +39,17 @@ builds:
3739 - -X main.date={{ .Date }}
3840 - -X main.builtBy=goreleaser
3941 mod_timestamp : " {{ .CommitTimestamp }}"
42+ hooks :
43+ post :
44+ - cmd : upx --best --lzma {{ .Path }}
45+ filter :
46+ and :
47+ - or :
48+ - goos : windows
49+ - goos : linux
50+ - or :
51+ - goarch : amd64
52+ - goarch : " 386"
4053
4154# 归档配置
4255archives :
@@ -105,6 +118,6 @@ release:
105118
106119 如有问题请提交 [Issue](https://github.com/{{ .Env.GITHUB_OWNER }}/{{ .Env.GITHUB_REPO }}/issues) 💬
107120
108- # 快照版本
121+ # 快照版本配置 (修复弃用的name_template)
109122snapshot :
110- name_template : " {{ incpatch .Version }}-dev-{{ .ShortCommit }}"
123+ version_template : " {{ incpatch .Version }}-dev-{{ .ShortCommit }}"
You can’t perform that action at this time.
0 commit comments