mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
fix(ci): 修复发布说明输出
- 修复 git-cliff 模板重复输出提交的问题 - 更新 GitHub Release 使用 release notes 文件作为正文 - 补充 PR review 修复记录与验证结果
This commit is contained in:
parent
3cb0177936
commit
a870ea28a8
5
.github/cliff.toml
vendored
5
.github/cliff.toml
vendored
@ -54,11 +54,6 @@ https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
|
|||||||
|
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
## What's Changed
|
|
||||||
{% for commit in commits -%}
|
|
||||||
{{ self::print_commit(commit=commit) }}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% for group, commits in commits | group_by(attribute="group") -%}
|
{% for group, commits in commits | group_by(attribute="group") -%}
|
||||||
### {{ group | striptags | trim }}
|
### {{ group | striptags | trim }}
|
||||||
{% for commit in commits -%}
|
{% for commit in commits -%}
|
||||||
|
|||||||
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@ -272,7 +272,7 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v3
|
uses: softprops/action-gh-release@v3
|
||||||
with:
|
with:
|
||||||
name: "Release ${{ github.ref_name }}"
|
name: "Release ${{ github.ref_name }}"
|
||||||
body: ${{ steps.cliff_release.outputs.content }}
|
body_path: RELEASE_NOTES.md
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
files: |
|
files: |
|
||||||
|
|||||||
@ -16,9 +16,9 @@
|
|||||||
- 恢复点编号:`SEMREL-RP-004`
|
- 恢复点编号:`SEMREL-RP-004`
|
||||||
- 当前阶段:`Phase 2`
|
- 当前阶段:`Phase 2`
|
||||||
- 当前焦点:
|
- 当前焦点:
|
||||||
- 将 preview / release 的 PAT 校验收敛为同一个复用入口,避免后续修复在两段脚本间漂移
|
- 收敛 PR #312 最新 AI review 的 release notes 输出问题
|
||||||
- 在 PAT 校验阶段提前识别“仅有 read、没有 push”的 token,真正覆盖 `git push --dry-run` 的权限前提
|
- 确保 `.github/cliff.toml` 不再重复输出同一批 commits
|
||||||
- 将 active tracking 中已稳定的历史完成项归档,恢复默认入口的可读性
|
- 确保 `publish.yml` 创建 GitHub Release 时通过文件传递多行 release notes
|
||||||
|
|
||||||
### 已知风险
|
### 已知风险
|
||||||
|
|
||||||
@ -29,6 +29,8 @@
|
|||||||
- `cycjimmy/semantic-release-action@v6` 需要在 preview / release 两端都安装 `conventional-changelog-conventionalcommits`
|
- `cycjimmy/semantic-release-action@v6` 需要在 preview / release 两端都安装 `conventional-changelog-conventionalcommits`
|
||||||
以保证 `conventionalcommits` preset 在 GitHub Actions 中可解析
|
以保证 `conventionalcommits` preset 在 GitHub Actions 中可解析
|
||||||
- 当前仓库本地 `dotnet clean/build` 会带出既有 analyzer warnings;本轮仅修正发版配置与文档,不额外处理这些历史 warning
|
- 当前仓库本地 `dotnet clean/build` 会带出既有 analyzer warnings;本轮仅修正发版配置与文档,不额外处理这些历史 warning
|
||||||
|
- `git-cliff-action` 的 `OUTPUT` 文件需要在 `softprops/action-gh-release` 执行时保留在当前工作目录,后续如调整
|
||||||
|
working-directory 或 artifact 路径,需要同步复查 `body_path`
|
||||||
|
|
||||||
## 已完成
|
## 已完成
|
||||||
|
|
||||||
@ -39,17 +41,32 @@
|
|||||||
`semantic-release` 的 `git push --dry-run` 阶段才失败
|
`semantic-release` 的 `git push --dry-run` 阶段才失败
|
||||||
- 已为 PAT 校验的 `mktemp` 文件补充 `trap` 清理,避免异常退出时遗留临时文件路径干扰日志
|
- 已为 PAT 校验的 `mktemp` 文件补充 `trap` 清理,避免异常退出时遗留临时文件路径干扰日志
|
||||||
- 已同步更新 active trace 到 `SEMREL-RP-004`,记录本轮 PR review 收敛结果
|
- 已同步更新 active trace 到 `SEMREL-RP-004`,记录本轮 PR review 收敛结果
|
||||||
|
- 已用 `$gframework-pr-review` 抓取 PR #312 最新 review payload,确认未失败测试、未发现 MegaLinter 明细,仍有
|
||||||
|
CodeRabbit / Greptile 针对 release notes 的未解决线程
|
||||||
|
- 已移除 `.github/cliff.toml` 中 `## What's Changed` 下的未分组 commit 循环,仅保留按 Conventional Commit group
|
||||||
|
分类后的输出,避免每个 commit 在生成的 changelog 中出现两次
|
||||||
|
- 已将 `.github/workflows/publish.yml` 的 GitHub Release 正文从多行 expression 改为 `body_path: RELEASE_NOTES.md`,
|
||||||
|
复用 `git-cliff-action` 写出的 release notes 文件
|
||||||
|
|
||||||
## 验证
|
## 验证
|
||||||
|
|
||||||
|
- `python3 -c 'import tomllib; tomllib.load(open(".github/cliff.toml", "rb")); print("cliff.toml OK")'`
|
||||||
|
- 结果:通过
|
||||||
|
- 备注:确认 `.github/cliff.toml` 仍为合法 TOML
|
||||||
|
- `python3 -c 'import yaml; yaml.safe_load(open(".github/workflows/publish.yml", encoding="utf-8")); print("publish.yml OK")'`
|
||||||
|
- 结果:通过
|
||||||
|
- 备注:确认 `.github/workflows/publish.yml` 仍可解析为 YAML
|
||||||
|
- `yq '.jobs."create-release".steps[] | select(.name == "Create GitHub Release and Upload Assets") | .with' .github/workflows/publish.yml`
|
||||||
|
- 结果:通过
|
||||||
|
- 备注:确认 release step 现在使用 `body_path: RELEASE_NOTES.md`
|
||||||
- `dotnet build GFramework.sln -c Release`
|
- `dotnet build GFramework.sln -c Release`
|
||||||
- 结果:通过
|
- 结果:通过
|
||||||
- 备注:Release 构建通过,`639 warning / 0 error`;warning 为仓库既有基线,preview 鉴权修复后与本轮 PAT 校验收敛后复验结果一致
|
- 备注:Release 构建通过,`0 warning / 0 error`;本轮只改动 GitHub Actions / git-cliff 配置
|
||||||
- 更早阶段的 dry-run / tag /抽象项目验证已归档到
|
- 更早阶段的 dry-run / tag /抽象项目验证已归档到
|
||||||
`ai-plan/public/semantic-release-versioning/archive/todos/semantic-release-versioning-2026-04-26.md`
|
`ai-plan/public/semantic-release-versioning/archive/todos/semantic-release-versioning-2026-04-26.md`
|
||||||
|
|
||||||
## 下一步
|
## 下一步
|
||||||
|
|
||||||
1. 手动重跑 `Semantic Release Version and Tag` 的 preview job,确认 read-only PAT 会在校验步骤提前失败、可写 PAT 不再进入 `git push --dry-run ... 403`
|
1. 提交并推送本轮 PR review 修复
|
||||||
2. 推送本轮修复后重新抓取 PR review,确认 CodeRabbit / Greptile 的 open threads 已转为过时或可关闭
|
2. 重新抓取 PR review,确认 CodeRabbit / Greptile 的 release notes open threads 已转为过时或可关闭
|
||||||
3. 如 CI 仍报告权限边界问题,再决定是否将 PAT 校验升级为更贴近真实链路的远端 git 探测
|
3. 如 CI 仍报告 release notes 发布问题,再优先复查 `git-cliff-action` 输出文件路径与 `action-gh-release` 输入契约
|
||||||
|
|||||||
@ -1,5 +1,30 @@
|
|||||||
# Semantic Release 版本迁移追踪
|
# Semantic Release 版本迁移追踪
|
||||||
|
|
||||||
|
## 2026-05-01
|
||||||
|
|
||||||
|
### 当前恢复点(SEMREL-RP-004)
|
||||||
|
|
||||||
|
- 通过 `$gframework-pr-review` 抓取当前分支 PR #312:
|
||||||
|
- CodeRabbit 对 `.github/cliff.toml` 提出 1 个未解决线程,指出 release notes 会重复输出 commit
|
||||||
|
- Greptile 对 `.github/cliff.toml` 提出同一问题的未解决线程
|
||||||
|
- Greptile 对 `.github/workflows/publish.yml` 提出 1 个未解决线程,指出多行 release notes expression 作为
|
||||||
|
`body` 传入 GitHub Release action 风险较高
|
||||||
|
- CTRF 测试报告显示 `2247 passed / 0 failed`
|
||||||
|
- 未找到 MegaLinter 明细块
|
||||||
|
- 本地复核结论:
|
||||||
|
- `.github/cliff.toml` 先遍历 `commits` 输出平铺列表,再对同一批 `commits` 按 `group` 输出,重复问题成立
|
||||||
|
- `.github/workflows/publish.yml` 已让 `git-cliff-action` 写出 `RELEASE_NOTES.md`,因此 `action-gh-release` 可直接使用
|
||||||
|
`body_path`
|
||||||
|
- 已应用修复:
|
||||||
|
- 删除 `.github/cliff.toml` 中 `## What's Changed` 下的未分组循环,只保留 grouped 输出
|
||||||
|
- 将 `.github/workflows/publish.yml` 的 `body` 改为 `body_path: RELEASE_NOTES.md`
|
||||||
|
- 已完成语法检查:
|
||||||
|
- `.github/cliff.toml` 通过 Python `tomllib` 解析
|
||||||
|
- `.github/workflows/publish.yml` 通过 PyYAML 解析
|
||||||
|
- `yq` 确认 release step 使用 `body_path`
|
||||||
|
- `dotnet build GFramework.sln -c Release` 通过,`0 warning / 0 error`。
|
||||||
|
- 下一步是提交并推送本轮 PR review 修复,然后重新抓取 PR review 确认相关线程状态。
|
||||||
|
|
||||||
## 2026-04-26
|
## 2026-04-26
|
||||||
|
|
||||||
### 当前恢复点(SEMREL-RP-004)
|
### 当前恢复点(SEMREL-RP-004)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user