diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index fdd5e49..fca8ac2 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -28,11 +28,10 @@ jobs: uses: actions/setup-go@v5 with: go-version: stable - - # 添加控制emoji标题的变量 - - name: Set Changelog Emoji Option - run: echo "USE_EMOJI_TITLE=true" >> $GITHUB_ENV - + + - name: Debug Environment Variables + run: echo "USE_EMOJI=$USE_EMOJI_TITLE" + # More assembly might be required: Docker logins, GPG, etc. # It all depends on your needs. - name: Run GoReleaser @@ -46,7 +45,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution - # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - - # Emoji标题变量 - USE_EMOJI_TITLE: ${{ env.USE_EMOJI_TITLE }} \ No newline at end of file + # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index c0dafb3..c8936ed 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -64,19 +64,25 @@ changelog: - "^更新文件" - "^测试(:|\\()" + # 根据正则表达式和标题分组提交消息 + # + # 顺序值定义分组顺序 + # 未提供正则表达式意味着所有提交都将分组到默认分组下 + # + # 匹配仅对提交消息的第一行执行,前缀为提交 SHA1,通常采用 `[:] ` 形式 + # 当使用 github-native 时,分组被禁用,因为它已经按自身分组 + # 正则表达式使用 RE2 语法,如下所示:https://github.com/google/re2/wiki/Syntax groups: # feat(UI): 新增用户登录界面、新增: 实现用户认证功能。 - # - title: "New Features" # “新功能” + - title: "New Features" # “新功能” # - title: "✨ New Features (新功能)" - - title: "{{ if .Env.USE_EMOJI }}✨ New Features (新功能){{ else }}New Features{{ end }}" regexp: '^(?i).*?(feat|功能|新增|feature|新特性)(\(.+\))??!?[-:\s].+$' order: 100 # fix: 修复UI组件加载延迟问题 - # - title: "Bug fixes" # “Bug 修复” + - title: "Bug fixes" # “Bug 修复” # - title: "🐛 Bug Fixes (修复问题)" - - title: "{{ if .Env.USE_EMOJI }}🐛 Bug Fixes (修复问题){{ else }}Bug fixes{{ end }}" regexp: '^(?i).*?(fix|修复|bug|错误|bugfix)(\(.+\))??!?[-:\s].+$' order: 200 @@ -94,13 +100,13 @@ changelog: # refactor: 代码重构,版本更新。 - title: "Code Refactor" # “代码重构(既不是增加feature,也不是修复bug)” - - title: "🚀 Code Refactor (代码重构)" + # - title: "🚀 Code Refactor (代码重构)" regexp: '^(?i).*?(refactor|重构|major|大版本)(\(.+\))??!?[-:\s].+$' order: 500 # pref: 优化用户登录流程,减少加载时间。 - # - title: "Code Optimization" # “性能优化” - - title: "⚡️ Code Optimization (性能优化)" + - title: "Code Optimization" # “性能优化” + # - title: "⚡️ Code Optimization (性能优化)" regexp: '^(?i).*?(perf?|performance|优化|性能|opt?|optimization)(\(.+\))??!?[-:\s].+$' order: 600 @@ -163,7 +169,8 @@ release: > {{.TagContents}} - Released in {{ .CommitDate }} + Released at {{ .CommitDate }} + footer: | **Full Changelog**: https://github.com/sinspired/ip-scanner/compare/{{ .PreviousTag }}...{{ if .IsNightly }}nightly{{ else }}{{ .Tag }}{{ end }}