release

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Release

版本发布

Full release orchestrator for the jackin project. Runs pre-release validation, generates changelog, recommends version, and executes
cargo release
.
jackin项目的完整发布编排工具。运行发布前验证、生成变更日志、推荐版本号并执行
cargo release

When 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
    release-check
    instead
  • If you just want to update the changelog: use
    release-notes
    instead
  • 如果你只想检查发布就绪状态:请改用
    release-check
  • 如果你只想更新变更日志:请改用
    release-notes

Prerequisites

前置条件

  • cargo-release
    must be installed:
    cargo install cargo-release
  • gh
    CLI must be authenticated:
    gh auth status
  • release.toml
    must have
    pre-release-replacements
    configured for CHANGELOG.md
  • CHANGELOG.md
    must exist with
    <!-- next-header -->
    marker
  • .github/workflows/ci.yml
    must exist
  • 必须安装
    cargo-release
    cargo install cargo-release
  • gh
    CLI必须已认证:
    gh auth status
  • release.toml
    必须配置
    pre-release-replacements
    以适配CHANGELOG.md
  • CHANGELOG.md必须存在且包含
    <!-- next-header -->
    标记
  • .github/workflows/ci.yml
    必须存在

Process

流程

Step 1: Run Release Check

步骤1:运行发布检查

Follow the
release-check
skill completely. Read
skills/release-check/SKILL.md
and execute all checks.
If 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-check
技能的要求。阅读
skills/release-check/SKILL.md
并执行所有检查项。
如果任何阻塞性检查失败,立即停止。展示就绪状态报告并告知用户需要修复的内容,不得继续。
如果仅存在警告待审核项,展示报告并询问:“检测到警告。是否继续发布?(是/否)”

Step 2: Run Release Notes

步骤2:生成发布说明

Follow the
release-notes
skill completely. Read
skills/release-notes/SKILL.md
and execute all steps.
Present the generated changelog section. Allow the user to review and edit.
Do not proceed until the user approves the changelog.
完整遵循
release-notes
技能的要求。阅读
skills/release-notes/SKILL.md
并执行所有步骤。
展示生成的变更日志章节,允许用户审核和编辑。
在用户批准变更日志前,不得继续。

Step 3: Recommend Version

步骤3:推荐版本号

Read the approved
[Unreleased]
section from
CHANGELOG.md
and analyze the categories:
ConditionRecommendation
Has entries in Removed or any entry mentions "breaking"major bump
Has entries in Addedminor bump
Only has Fixed, Changed, Security, Deprecatedpatch 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(次版本)升级
仅包含FixedChangedSecurityDeprecated条目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
CHANGELOG.md
has uncommitted changes (from Step 2), commit them:
bash
git add CHANGELOG.md
git commit -m "docs: update changelog for vX.Y.Z"
Replace
X.Y.Z
with the recommended version from Step 3.
如果CHANGELOG.md存在未提交的变更(来自步骤2),提交它们:
bash
git add CHANGELOG.md
git commit -m "docs: update changelog for vX.Y.Z"
X.Y.Z
替换为步骤3中推荐的版本号。

Step 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
cargo release
without explicit "yes" from the user.
展示摘要:
发布摘要
===============
版本号:   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 release

Step 6: Execute Release

步骤6:执行发布

bash
cargo release {major|minor|patch} --execute
Where
{major|minor|patch}
matches the user-confirmed bump level from Step 3.
Monitor the output. If
cargo release
fails, show the error and stop.
bash
cargo release {major|minor|patch} --execute
其中
{major|minor|patch}
需与步骤3中用户确认的升级级别一致。
监控输出。如果
cargo release
执行失败,展示错误信息并停止。

Step 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
    cargo release
    :
    Safe to fix and re-run
    /release
    . The skill re-validates everything.
  • During
    cargo release
    :
    Check what was committed/tagged. If the tag was created but not pushed, you can push it manually:
    git push origin vX.Y.Z
    . If the version bump commit was created but not tagged, you may need to reset and retry.
  • After
    cargo release
    :
    The release is done. If CI fails, check the GitHub Actions workflow.
如果任何步骤出现问题:
  • cargo release
    执行前
    :可以安全地修复问题并重新运行
    /release
    。该技能会重新验证所有内容。
  • cargo release
    执行过程中
    :检查已提交和标记的内容。如果标签已创建但未推送,可以手动推送:
    git push origin vX.Y.Z
    。如果版本升级提交已创建但未标记,可能需要重置并重试。
  • cargo release
    执行后
    :发布已完成。如果CI失败,请检查GitHub Actions工作流。