release
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRelease
版本发布
Full release orchestrator for the jackin project. Runs pre-release validation, generates changelog, recommends version, and executes .
cargo releasejackin项目的完整发布编排工具。运行发布前验证、生成变更日志、推荐版本号并执行。
cargo releaseWhen to Use
使用场景
- When you want to cut a new release
- When asked to "release", "cut a version", or "ship it"
- 当你需要切割新版本时
- 当被要求“发布”、“切割版本”或“上线”时
When NOT to Use
不适用场景
- If you just want to check readiness: use instead
release-check - If you just want to update the changelog: use instead
release-notes
- 如果你只想检查发布就绪状态:请改用
release-check - 如果你只想更新变更日志:请改用
release-notes
Prerequisites
前置条件
- must be installed:
cargo-releasecargo install cargo-release - CLI must be authenticated:
ghgh auth status - must have
release.tomlconfigured for CHANGELOG.mdpre-release-replacements - must exist with
CHANGELOG.mdmarker<!-- next-header --> - must exist
.github/workflows/ci.yml
- 必须安装:
cargo-releasecargo install cargo-release - CLI必须已认证:
ghgh auth status - 必须配置
release.toml以适配CHANGELOG.mdpre-release-replacements - CHANGELOG.md必须存在且包含标记
<!-- next-header --> - 必须存在
.github/workflows/ci.yml
Process
流程
Step 1: Run Release Check
步骤1:运行发布检查
Follow the skill completely. Read and execute all checks.
release-checkskills/release-check/SKILL.mdIf any blocking check fails, STOP. Show the readiness report and tell the user what needs to be fixed. Do not proceed.
If only warnings or review items exist, show the report and ask: "Warnings found. Continue with release? (yes/no)"
完整遵循技能的要求。阅读并执行所有检查项。
release-checkskills/release-check/SKILL.md如果任何阻塞性检查失败,立即停止。展示就绪状态报告并告知用户需要修复的内容,不得继续。
如果仅存在警告或待审核项,展示报告并询问:“检测到警告。是否继续发布?(是/否)”
Step 2: Run Release Notes
步骤2:生成发布说明
Follow the skill completely. Read and execute all steps.
release-notesskills/release-notes/SKILL.mdPresent the generated changelog section. Allow the user to review and edit.
Do not proceed until the user approves the changelog.
完整遵循技能的要求。阅读并执行所有步骤。
release-notesskills/release-notes/SKILL.md展示生成的变更日志章节,允许用户审核和编辑。
在用户批准变更日志前,不得继续。
Step 3: Recommend Version
步骤3:推荐版本号
Read the approved section from and analyze the categories:
[Unreleased]CHANGELOG.md| Condition | Recommendation |
|---|---|
| Has entries in Removed or any entry mentions "breaking" | major bump |
| Has entries in Added | minor bump |
| Only has Fixed, Changed, Security, Deprecated | patch bump |
Get the current version:
bash
grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/'Calculate the recommended next version and present:
"Current version: v0.4.0 Changelog has: 2 Added, 1 Fixed, 1 Changed Recommendation: v0.5.0 (minor — new features added)Accept this version, or specify a different bump level? (major/minor/patch)"
Wait for user confirmation.
读取CHANGELOG.md中已批准的章节并分析分类:
[Unreleased]| 条件 | 推荐方案 |
|---|---|
| 包含Removed条目或任何条目提及“breaking”(破坏性变更) | major(主版本)升级 |
| 包含Added条目 | minor(次版本)升级 |
| 仅包含Fixed、Changed、Security、Deprecated条目 | patch(补丁版本)升级 |
获取当前版本:
bash
grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/'计算推荐的下一版本并展示:
"当前版本: v0.4.0 变更日志包含: 2个新增功能, 1个修复, 1个变更 推荐版本: v0.5.0(次版本升级——新增功能)是否接受此版本,或指定其他升级级别?(major/minor/patch)"
等待用户确认。
Step 4: Commit Changelog
步骤4:提交变更日志
If has uncommitted changes (from Step 2), commit them:
CHANGELOG.mdbash
git add CHANGELOG.md
git commit -m "docs: update changelog for vX.Y.Z"Replace with the recommended version from Step 3.
X.Y.Z如果CHANGELOG.md存在未提交的变更(来自步骤2),提交它们:
bash
git add CHANGELOG.md
git commit -m "docs: update changelog for vX.Y.Z"将替换为步骤3中推荐的版本号。
X.Y.ZStep 5: Final Confirmation
步骤5:最终确认
Present a summary:
Release Summary
===============
Version: v0.5.0 (minor)
Changelog: 2 Added, 1 Fixed, 1 Changed
Checks: all green (1 warning)
Command: cargo release minor --execute
This will:
1. Bump version in Cargo.toml to 0.5.0
2. Rename [Unreleased] to [0.5.0] - 2026-04-04 in CHANGELOG.md
3. Add new [Unreleased] section
4. Create release commit: "chore: release v0.5.0"
5. Create tag: v0.5.0
6. Push commit and tag to origin
Proceed? (yes/no)Do NOT run without explicit "yes" from the user.
cargo release展示摘要:
发布摘要
===============
版本号: v0.5.0(次版本)
变更日志: 2个新增功能, 1个修复, 1个变更
检查状态: 全部通过(1个警告)
执行命令: cargo release minor --execute
该命令将执行以下操作:
1. 将Cargo.toml中的版本号升级至0.5.0
2. 将CHANGELOG.md中的[Unreleased]重命名为[0.5.0] - 2026-04-04
3. 添加新的[Unreleased]章节
4. 创建发布提交: "chore: release v0.5.0"
5. 创建标签: v0.5.0
6. 将提交和标签推送到origin
是否继续?(是/否)在未获得用户明确的“是”之前,不得运行。
cargo releaseStep 6: Execute Release
步骤6:执行发布
bash
cargo release {major|minor|patch} --executeWhere matches the user-confirmed bump level from Step 3.
{major|minor|patch}Monitor the output. If fails, show the error and stop.
cargo releasebash
cargo release {major|minor|patch} --execute其中需与步骤3中用户确认的升级级别一致。
{major|minor|patch}监控输出。如果执行失败,展示错误信息并停止。
cargo releaseStep 7: Post-Release Verification
步骤7:发布后验证
Verify the tag was pushed:
bash
git tag -l "vX.Y.Z"
git ls-remote --tags origin "refs/tags/vX.Y.Z"Remind the user:
"Release v0.5.0 tagged and pushed. GitHub Actions will now:
- Build release binaries for all targets
- Create the GitHub Release with artifacts
- Update the Homebrew tap
验证标签已推送:
bash
git tag -l "vX.Y.Z"
git ls-remote --tags origin "refs/tags/vX.Y.Z"提醒用户:
"v0.5.0版本已标记并推送。GitHub Actions将执行以下操作:
- 为所有目标构建发布二进制文件
- 创建带有产物的GitHub Release
- 更新Homebrew源
Error Recovery
错误恢复
If something goes wrong at any step:
- Before : Safe to fix and re-run
cargo release. The skill re-validates everything./release - During : Check what was committed/tagged. If the tag was created but not pushed, you can push it manually:
cargo release. If the version bump commit was created but not tagged, you may need to reset and retry.git push origin vX.Y.Z - After : The release is done. If CI fails, check the GitHub Actions workflow.
cargo release
如果任何步骤出现问题:
- 在执行前:可以安全地修复问题并重新运行
cargo release。该技能会重新验证所有内容。/release - 在执行过程中:检查已提交和标记的内容。如果标签已创建但未推送,可以手动推送:
cargo release。如果版本升级提交已创建但未标记,可能需要重置并重试。git push origin vX.Y.Z - 在执行后:发布已完成。如果CI失败,请检查GitHub Actions工作流。
cargo release