chore(release): simplify public notes
This commit is contained in:
1 parent
16daa4155f
commit
ae50c746be
5 files changed
+14
-56
No files matched your search
@@ -18,7 +18,7 @@
|
||||
6. **桌面验证职责**:桌面 Release 工作流负责测试、包结构检查、签名与公证;代理不再重复下载 Draft 或执行本地首次启动验收,除非用户明确要求。
|
||||
7. **发布后安装**:正式发布后,从该 GitHub Release 下载与当前 Mac 架构匹配的最终 DMG,覆盖安装 `/Applications/EdgeEver.app` 并启动,保留用户数据。功能体验由用户在实际使用中验证。
|
||||
8. **失败处理**:工作流或资产审计失败时保持或恢复 Draft,修复后重跑;不得公开已知损坏的 Release。
|
||||
9. **Release 说明结构**:使用中英文双语格式(正文禁止包含字面量 `\n`)。功能/修复关联对应 Issue 并标记 Label,发布后回链并关闭 Issue。正文结构:
|
||||
9. **Release 说明结构**:使用中英文双语格式(正文禁止包含字面量 `\n`),只写用户可感知的变化、影响以及必要的升级或迁移提醒。类型检查、构建命令、签名、公证、资产复用等技术验证细节保留在 Actions 和关联 Issue 中,不写入公开 Release 正文。功能/修复关联对应 Issue 并标记 Label,发布后回链并关闭 Issue。正文结构:
|
||||
|
||||
```md
|
||||
## Key Changes
|
||||
@@ -27,10 +27,6 @@
|
||||
|
||||
Related Issue: #<issue-number>
|
||||
|
||||
## Verification
|
||||
|
||||
- List completed tests, type checks, and build results in English.
|
||||
|
||||
## 🇨🇳 中文说明 / Chinese Changelog
|
||||
|
||||
## 主要更新
|
||||
@@ -38,10 +34,6 @@ Related Issue: #<issue-number>
|
||||
- 面向用户说明本次变化及影响。
|
||||
|
||||
关联 Issue:#<issue-number>
|
||||
|
||||
## 验证
|
||||
|
||||
- 列出实际完成的测试、类型检查和构建结果。
|
||||
```
|
||||
|
||||
## 环境、部署与组件约束
|
||||
|
||||
@@ -30,6 +30,10 @@ bun run release -- \
|
||||
|
||||
Repeat `--change-en` and `--change-zh` in matching pairs when a Release contains
|
||||
multiple changes. Repeat `--label` when the tracking Issue needs multiple labels.
|
||||
Public Release notes contain only user-visible changes, their impact, and any
|
||||
required upgrade or migration guidance. Type checks, build commands, signing,
|
||||
notarization, and asset-audit details remain in GitHub Actions and the linked
|
||||
tracking Issue instead of being repeated in the public notes.
|
||||
|
||||
`--bump` is required and must be selected from the user and compatibility impact
|
||||
of the complete Release:
|
||||
|
||||
@@ -27,6 +27,9 @@ bun run release -- \
|
||||
|
||||
如果一个 Release 包含多项改动,请成对重复传入 `--change-en` 和
|
||||
`--change-zh`。跟踪 Issue 需要多个 Label 时,可以重复传入 `--label`。
|
||||
公开 Release 说明只包含用户可感知的变化、影响以及必要的升级或迁移提醒。
|
||||
类型检查、构建命令、签名、公证和资产审计等技术细节保留在 GitHub Actions
|
||||
与关联跟踪 Issue 中,不再重复写入公开说明。
|
||||
|
||||
`--bump` 为必填项,必须根据整个 Release 对用户和兼容性的影响选择:
|
||||
|
||||
|
||||
@@ -188,10 +188,6 @@ export const buildReleaseNotes = ({
|
||||
changesEn,
|
||||
changesZh,
|
||||
issueNumber,
|
||||
desktopRebuild,
|
||||
mobileRebuild,
|
||||
previousTag,
|
||||
bump,
|
||||
}) => [
|
||||
"## Key Changes",
|
||||
"",
|
||||
@@ -199,20 +195,6 @@ export const buildReleaseNotes = ({
|
||||
"",
|
||||
`Related Issue: #${issueNumber}`,
|
||||
"",
|
||||
"## Verification",
|
||||
"",
|
||||
"- `bun run typecheck`",
|
||||
"- `bun run typecheck:mobile`",
|
||||
"- `bun run build:web`",
|
||||
"- Native release planning and asset audit tests.",
|
||||
`- Version bump: \`${bump}\`.`,
|
||||
desktopRebuild
|
||||
? "- Desktop release plan: rebuild, sign, notarize, and verify new macOS arm64 and x64 DMGs."
|
||||
: `- Desktop release plan: reuse the verified assets from ${previousTag} with their original filenames and checksums.`,
|
||||
mobileRebuild
|
||||
? "- Android release plan: rebuild and verify a signed arm64 APK."
|
||||
: `- Android release plan: reuse the verified APK from ${previousTag} with its original filename and checksum.`,
|
||||
"",
|
||||
"## 🇨🇳 中文说明 / Chinese Changelog",
|
||||
"",
|
||||
"## 主要更新",
|
||||
@@ -221,20 +203,6 @@ export const buildReleaseNotes = ({
|
||||
"",
|
||||
`关联 Issue:#${issueNumber}`,
|
||||
"",
|
||||
"## 验证",
|
||||
"",
|
||||
"- `bun run typecheck`",
|
||||
"- `bun run typecheck:mobile`",
|
||||
"- `bun run build:web`",
|
||||
"- 原生 Release 规划与资产审计测试。",
|
||||
`- 版本递增级别:\`${bump}\`。`,
|
||||
desktopRebuild
|
||||
? "- 桌面端 Release 计划:重新构建、签名、公证并验证新的 macOS arm64 与 x64 DMG。"
|
||||
: `- 桌面端 Release 计划:复用 ${previousTag} 已验证资产,并保留原始文件名与校验和。`,
|
||||
mobileRebuild
|
||||
? "- Android Release 计划:重新构建并验证签名 arm64 APK。"
|
||||
: `- Android Release 计划:复用 ${previousTag} 已验证 APK,并保留原始文件名与校验和。`,
|
||||
"",
|
||||
].join("\n");
|
||||
|
||||
export const reusedAssetMatches = (previousAssets, currentAssets, name) => {
|
||||
@@ -717,10 +685,6 @@ const releaseMain = async (options) => {
|
||||
changesEn: options.changesEn,
|
||||
changesZh: options.changesZh,
|
||||
issueNumber: 0,
|
||||
desktopRebuild: desktopPlan.rebuild,
|
||||
mobileRebuild: mobilePlan.rebuild,
|
||||
previousTag,
|
||||
bump: options.bump,
|
||||
}));
|
||||
return;
|
||||
}
|
||||
@@ -771,10 +735,6 @@ const releaseMain = async (options) => {
|
||||
changesEn: options.changesEn,
|
||||
changesZh: options.changesZh,
|
||||
issueNumber,
|
||||
desktopRebuild: desktopPlan.rebuild,
|
||||
mobileRebuild: mobilePlan.rebuild,
|
||||
previousTag,
|
||||
bump: options.bump,
|
||||
});
|
||||
const draftUrl = run("gh", [
|
||||
"release",
|
||||
|
||||
@@ -76,22 +76,21 @@ describe("release automation", () => {
|
||||
).toThrow("--bump must be patch, minor, or major");
|
||||
});
|
||||
|
||||
test("builds required bilingual release note structure with real newlines", () => {
|
||||
test("builds concise user-facing bilingual release notes", () => {
|
||||
const notes = buildReleaseNotes({
|
||||
changesEn: ["Improve the release flow."],
|
||||
changesZh: ["优化发布流程。"],
|
||||
issueNumber: 126,
|
||||
desktopRebuild: false,
|
||||
mobileRebuild: false,
|
||||
previousTag: "v1.6.50",
|
||||
bump: "patch",
|
||||
});
|
||||
expect(notes).toContain("## Key Changes");
|
||||
expect(notes).toContain("Related Issue: #126");
|
||||
expect(notes).toContain("## 🇨🇳 中文说明 / Chinese Changelog");
|
||||
expect(notes).toContain("关联 Issue:#126");
|
||||
expect(notes).toContain("Version bump: `patch`.");
|
||||
expect(notes).toContain("版本递增级别:`patch`。");
|
||||
expect(notes).not.toContain("## Verification");
|
||||
expect(notes).not.toContain("## 验证");
|
||||
expect(notes).not.toContain("bun run");
|
||||
expect(notes).not.toContain("Version bump");
|
||||
expect(notes).not.toContain("release plan");
|
||||
expect(notes).not.toContain("\\n");
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user