From 5dd74269a80b52c21abb2db40ba489f42272cd82 Mon Sep 17 00:00:00 2001 From: ZacharyZcR Date: Thu, 17 Jul 2025 22:07:13 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=B5=8B=E8=AF=95=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/conf/.goreleaser.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/conf/.goreleaser.yml b/.github/conf/.goreleaser.yml index 75df68d..4a36dd7 100644 --- a/.github/conf/.goreleaser.yml +++ b/.github/conf/.goreleaser.yml @@ -1,4 +1,6 @@ -# GoReleaser v1 配置文件 +# GoReleaser v2 配置文件 +version: 2 + project_name: "{{ .Env.PROJECT_NAME }}" # 构建前钩子 @@ -37,6 +39,17 @@ builds: - -X main.date={{ .Date }} - -X main.builtBy=goreleaser mod_timestamp: "{{ .CommitTimestamp }}" + hooks: + post: + - cmd: upx --best --lzma {{ .Path }} + filter: + and: + - or: + - goos: windows + - goos: linux + - or: + - goarch: amd64 + - goarch: "386" # 归档配置 archives: @@ -105,6 +118,6 @@ release: 如有问题请提交 [Issue](https://github.com/{{ .Env.GITHUB_OWNER }}/{{ .Env.GITHUB_REPO }}/issues) 💬 -# 快照版本 +# 快照版本配置 (修复弃用的name_template) snapshot: - name_template: "{{ incpatch .Version }}-dev-{{ .ShortCommit }}" \ No newline at end of file + version_template: "{{ incpatch .Version }}-dev-{{ .ShortCommit }}" \ No newline at end of file