claude-code-plugin-release

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Version Bump & Release Workflow

版本升级与发布工作流

IMPORTANT: You must first plan and write detailed release notes before starting the version bump workflow.
CRITICAL: ALWAYS commit EVERYTHING (including build artifacts). At the end of this workflow, NOTHING should be left uncommitted or unpushed. Run
git status
at the end to verify.
重要提示: 启动版本升级工作流前,你必须先规划并编写详细的发布说明。
关键注意事项: 务必提交所有内容(包括构建产物)。工作流执行结束后,不应有任何未提交或未推送的内容。最后执行
git status
命令验证状态。

Preparation

准备工作

  1. Analyze: Determine if the change is a PATCH (bug fixes), MINOR (features), or MAJOR (breaking) update.
  2. Environment: Identify the repository owner and name (e.g., from
    git remote -v
    ).
  3. Paths: Verify existence of
    package.json
    ,
    .claude-plugin/marketplace.json
    , and
    plugin/.claude-plugin/plugin.json
    .
  1. 分析版本类型:确定本次变更属于PATCH(漏洞修复)、MINOR(新增功能)还是MAJOR(破坏性变更)更新。
  2. 确认环境信息:识别仓库的所有者和名称(例如通过
    git remote -v
    命令获取)。
  3. 验证文件路径:确认
    package.json
    .claude-plugin/marketplace.json
    plugin/.claude-plugin/plugin.json
    文件存在。

Workflow

工作流

  1. Update: Increment version strings in all configuration files.
  2. Verify: Use
    grep
    to ensure all files match the new version.
  3. Build: Run
    npm run build
    to generate fresh artifacts.
  4. Commit: Stage all changes including artifacts:
    git add -A && git commit -m "chore: bump version to X.Y.Z"
    .
  5. Tag: Create an annotated tag:
    git tag -a vX.Y.Z -m "Version X.Y.Z"
    .
  6. Push:
    git push origin main && git push origin vX.Y.Z
    .
  7. Release:
    gh release create vX.Y.Z --title "vX.Y.Z" --notes "RELEASE_NOTES"
    .
  8. Changelog: Regenerate
    CHANGELOG.md
    using the GitHub API and the provided script:
    bash
    gh api repos/{owner}/{repo}/releases --paginate | ./scripts/generate_changelog.js > CHANGELOG.md
  9. Sync: Commit and push the updated
    CHANGELOG.md
    .
  10. Notify: Run
    npm run discord:notify vX.Y.Z
    if applicable.
  11. Finalize: Run
    git status
    to ensure a clean working tree.
  1. 更新版本号:递增所有配置文件中的版本号字符串。
  2. 校验版本一致性:使用
    grep
    命令确保所有文件的版本号都已同步为新版本。
  3. 构建产物:运行
    npm run build
    生成最新的构建产物。
  4. 提交变更:暂存包括构建产物在内的所有变更:
    git add -A && git commit -m "chore: bump version to X.Y.Z"
  5. 打标签:创建附注标签:
    git tag -a vX.Y.Z -m "Version X.Y.Z"
  6. 推送变更:执行
    git push origin main && git push origin vX.Y.Z
  7. 创建发布版本:执行
    gh release create vX.Y.Z --title "vX.Y.Z" --notes "RELEASE_NOTES"
  8. 生成变更日志:使用GitHub API和提供的脚本重新生成
    CHANGELOG.md
    bash
    gh api repos/{owner}/{repo}/releases --paginate | ./scripts/generate_changelog.js > CHANGELOG.md
  9. 同步变更日志:提交并推送更新后的
    CHANGELOG.md
  10. 发送通知:如果适用,运行
    npm run discord:notify vX.Y.Z
  11. 收尾校验:运行
    git status
    确保工作树干净。

Checklist

检查清单

  • All config files have matching versions
  • npm run build
    succeeded
  • Git tag created and pushed
  • GitHub release created with notes
  • CHANGELOG.md
    updated and pushed
  • git status
    shows clean tree
  • 所有配置文件版本号一致
  • npm run build
    执行成功
  • Git标签已创建并推送
  • 已创建带发布说明的GitHub Release
  • CHANGELOG.md
    已更新并推送
  • git status
    显示工作树干净