Skip to content

Commit 5f862f3

Browse files
fix: 修复了changelog错误的问题
1 parent c100978 commit 5f862f3

2 files changed

Lines changed: 13 additions & 15 deletions

File tree

.github/cliff.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ body = """
5656
{%- if contributor.pr_number %} in \
5757
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
5858
{%- endif %}
59-
{%- endfor -%}
60-
{%- endif %}
59+
{% endfor %}
60+
{% endif %}
6161
"""
6262

6363
# 尾部

.github/workflows/install.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -236,21 +236,18 @@ jobs:
236236
name: MaaNTE-win-${{ matrix.arch }}-${{ needs.meta.outputs.tag }}-MXU
237237
path: "install-mxu"
238238

239-
changelog:
240-
name: Generate changelog
241-
needs: meta
239+
release:
240+
if: ${{ needs.meta.outputs.is_release == 'true' }}
241+
needs: [meta, windows]
242242
runs-on: ubuntu-latest
243-
outputs:
244-
release_body: ${{ steps.git-cliff.outputs.content }}
245243
steps:
246244
- name: Checkout
247245
uses: actions/checkout@v4
248246
with:
249247
fetch-depth: 0
250248

251-
- name: Generate a changelog
249+
- name: Generate release notes
252250
uses: orhun/git-cliff-action@v4
253-
id: git-cliff
254251
with:
255252
config: .github/cliff.toml
256253
# 正式版:使用 tag-pattern 只匹配正式版标签,包含所有从上一个正式版以来的提交
@@ -262,11 +259,12 @@ jobs:
262259
OUTPUT: CHANGES.md
263260
GITHUB_REPO: ${{ github.repository }}
264261

265-
release:
266-
if: ${{ needs.meta.outputs.is_release == 'true' }}
267-
needs: [meta, windows, changelog]
268-
runs-on: ubuntu-latest
269-
steps:
262+
- name: Check release notes
263+
shell: bash
264+
run: |
265+
test -s CHANGES.md
266+
cat CHANGES.md
267+
270268
- uses: actions/download-artifact@v4
271269
with:
272270
path: assets
@@ -315,7 +313,7 @@ jobs:
315313
with:
316314
files: assets/*
317315
tag_name: ${{ needs.meta.outputs.tag }}
318-
body: ${{ needs.changelog.outputs.release_body }}
316+
body_path: CHANGES.md
319317
draft: false
320318
prerelease: ${{ needs.meta.outputs.is_prerelease == 'true' }}
321319

0 commit comments

Comments
 (0)