Skip to content

Commit 2db6a90

Browse files
committed
test: goreleaser
1 parent 06522eb commit 2db6a90

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

.github/workflows/create_release.yml

+5-9
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ jobs:
2828
uses: actions/setup-go@v5
2929
with:
3030
go-version: stable
31-
32-
# 添加控制emoji标题的变量
33-
- name: Set Changelog Emoji Option
34-
run: echo "USE_EMOJI_TITLE=true" >> $GITHUB_ENV
35-
31+
32+
- name: Debug Environment Variables
33+
run: echo "USE_EMOJI=$USE_EMOJI_TITLE"
34+
3635
# More assembly might be required: Docker logins, GPG, etc.
3736
# It all depends on your needs.
3837
- name: Run GoReleaser
@@ -46,7 +45,4 @@ jobs:
4645
env:
4746
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4847
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
49-
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
50-
51-
# Emoji标题变量
52-
USE_EMOJI_TITLE: ${{ env.USE_EMOJI_TITLE }}
48+
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

.goreleaser.yaml

+15-8
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,25 @@ changelog:
6464
- "^更新文件"
6565
- "^测试(:|\\()"
6666

67+
# 根据正则表达式和标题分组提交消息
68+
#
69+
# 顺序值定义分组顺序
70+
# 未提供正则表达式意味着所有提交都将分组到默认分组下
71+
#
72+
# 匹配仅对提交消息的第一行执行,前缀为提交 SHA1,通常采用 `<abbrev-commit>[:] <title-commit>` 形式
73+
# 当使用 github-native 时,分组被禁用,因为它已经按自身分组
74+
# 正则表达式使用 RE2 语法,如下所示:https://github.com/google/re2/wiki/Syntax
6775
groups:
6876
# feat(UI): 新增用户登录界面、新增: 实现用户认证功能。
69-
# - title: "New Features" # “新功能”
77+
- title: "New Features" # “新功能”
7078
# - title: "✨ New Features (新功能)"
71-
- title: "{{ if .Env.USE_EMOJI }}✨ New Features (新功能){{ else }}New Features{{ end }}"
7279
regexp: '^(?i).*?(feat|功能|新增|feature|新特性)(\(.+\))??!?[-:\s].+$'
7380
order: 100
7481

7582

7683
# fix: 修复UI组件加载延迟问题
77-
# - title: "Bug fixes" # “Bug 修复”
84+
- title: "Bug fixes" # “Bug 修复”
7885
# - title: "🐛 Bug Fixes (修复问题)"
79-
- title: "{{ if .Env.USE_EMOJI }}🐛 Bug Fixes (修复问题){{ else }}Bug fixes{{ end }}"
8086
regexp: '^(?i).*?(fix|修复|bug|错误|bugfix)(\(.+\))??!?[-:\s].+$'
8187
order: 200
8288

@@ -94,13 +100,13 @@ changelog:
94100

95101
# refactor: 代码重构,版本更新。
96102
- title: "Code Refactor" # “代码重构(既不是增加feature,也不是修复bug)”
97-
- title: "🚀 Code Refactor (代码重构)"
103+
# - title: "🚀 Code Refactor (代码重构)"
98104
regexp: '^(?i).*?(refactor|重构|major|大版本)(\(.+\))??!?[-:\s].+$'
99105
order: 500
100106

101107
# pref: 优化用户登录流程,减少加载时间。
102-
# - title: "Code Optimization" # “性能优化”
103-
- title: "⚡️ Code Optimization (性能优化)"
108+
- title: "Code Optimization" # “性能优化”
109+
# - title: "⚡️ Code Optimization (性能优化)"
104110
regexp: '^(?i).*?(perf?|performance|优化|性能|opt?|optimization)(\(.+\))??!?[-:\s].+$'
105111
order: 600
106112

@@ -163,7 +169,8 @@ release:
163169
164170
> {{.TagContents}}
165171
166-
Released in {{ .CommitDate }}
172+
Released at {{ .CommitDate }}
173+
167174
168175
footer: |
169176
**Full Changelog**: https://github.com/sinspired/ip-scanner/compare/{{ .PreviousTag }}...{{ if .IsNightly }}nightly{{ else }}{{ .Tag }}{{ end }}

0 commit comments

Comments
 (0)