version-bump
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVersion Bump & Release Workflow
版本升级与发布工作流
IMPORTANT: Plan and write detailed release notes before starting.
CRITICAL: Commit EVERYTHING (including build artifacts). At the end of this workflow, NOTHING should be left uncommitted or unpushed. Run at the end to verify.
git status重要提示: 开始前请规划并撰写详细的发布说明。
关键要求: 提交所有内容(包括构建产物)。工作流结束时,不得有任何未提交或未推送的内容。最后运行进行验证。
git statusPreparation
准备工作
-
Analyze: Determine if the change is PATCH (bug fixes), MINOR (features), or MAJOR (breaking).
-
Environment: Identify repository owner/name from.
git remote -v -
Paths — every file that carries the version string:
- — the npm/npx-published version (
package.jsonresolves from this)npx claude-mem@X.Y.Z - — bundled plugin runtime deps
plugin/package.json - — version inside
.claude-plugin/marketplace.jsonplugins[0].version - — top-level Claude-plugin manifest
.claude-plugin/plugin.json - — bundled Claude-plugin manifest
plugin/.claude-plugin/plugin.json - — Codex-plugin manifest
.codex-plugin/plugin.json - — bundled Codex-plugin manifest
plugin/.codex-plugin/plugin.json - — OpenClaw plugin manifest
openclaw/openclaw.plugin.json
Verify coverage before editing:should list all eight. If a new manifest has been added since this doc was last updated, update this list.git grep -l "\"version\": \"<OLD>\""
-
分析:判断本次变更属于PATCH(补丁,修复bug)、MINOR(小版本,新增功能)还是MAJOR(大版本,破坏性变更)。
-
环境:通过确认仓库所有者/名称。
git remote -v -
路径 — 所有包含版本号的文件:
- — npm/npx发布版本(
package.json从此文件解析版本)npx claude-mem@X.Y.Z - — 插件捆绑运行时依赖
plugin/package.json - —
.claude-plugin/marketplace.json中的版本号plugins[0].version - — 顶层Claude插件清单
.claude-plugin/plugin.json - — 捆绑后的Claude插件清单
plugin/.claude-plugin/plugin.json - — Codex插件清单
.codex-plugin/plugin.json - — 捆绑后的Codex插件清单
plugin/.codex-plugin/plugin.json - — OpenClaw插件清单
openclaw/openclaw.plugin.json
编辑前请验证覆盖范围:运行应列出上述8个文件。如果自本文档上次更新后新增了新的清单文件,请更新此列表。git grep -l "\"version\": \"<OLD>\""
Workflow
工作流步骤
- Update: Increment the version string in every path above. Do NOT touch — it's regenerated.
CHANGELOG.md - Verify: — confirm all eight files match.
git grep -n "\"version\": \"<NEW>\""— should return zero hits.git grep -n "\"version\": \"<OLD>\"" - Build and sync: to regenerate artifacts, sync the local marketplace copy, restart the worker, and clear the queue. Do not use plain
npm run build-and-syncfor release validation because it can leave the local marketplace/worker out of sync.npm run build - Commit: .
git add -A && git commit -m "chore: bump version to X.Y.Z" - Tag: .
git tag -a vX.Y.Z -m "Version X.Y.Z" - Push: .
git push origin main && git push origin vX.Y.Z - Publish to npm — HAND OFF TO HUMAN. The human maintainer raised npm
security, so publishing now requires credentials/2FA only they can provide.
The agent MUST NOT run (or
npm publish/np, which also publish) itself. Hand off NPM publishing to the human now: stop and tell them the version is committed, tagged, and pushed, and that they must publish to npm to makenpm run release:*resolve. Give them the command:npx claude-mem@X.Y.ZWait for the human to confirm they published, then verify it landed:bashnpm publish # run by the HUMAN — the prepublishOnly script rebuilds the packageIf the publish build touched local artifacts, runbashnpm view claude-mem@X.Y.Z version # should print X.Y.Zagain afterward.npm run build-and-sync - GitHub release: .
gh release create vX.Y.Z --title "vX.Y.Z" --notes "RELEASE_NOTES" - Changelog: Regenerate via the project's changelog script:
(Runsbash
npm run changelog:generate, which pulls releases from the GitHub API and rewritesnode scripts/generate-changelog.js.)CHANGELOG.md - Sync changelog: Commit and push the updated .
CHANGELOG.md - Notify: Run the Discord notification from , where the
~/Scripts/claude-mem/with Discord webhook details lives:.envDo this even when the release worktree does not have a localbashcd ~/Scripts/claude-mem/ && npm run discord:notify vX.Y.Z..env - Finalize: — working tree must be clean.
git status
- 更新版本:在上述所有路径中递增版本号。请勿修改— 它会自动重新生成。
CHANGELOG.md - 验证版本:运行— 确认所有8个文件的版本号一致。运行
git grep -n "\"version\": \"<NEW>\""— 应返回零匹配结果。git grep -n "\"version\": \"<OLD>\"" - 构建与同步:运行重新生成产物、同步本地市场副本、重启工作进程并清除队列。请勿使用普通的
npm run build-and-sync进行发布验证,因为它可能导致本地市场/工作进程不同步。npm run build - 提交变更:运行。
git add -A && git commit -m "chore: bump version to X.Y.Z" - 打标签:运行。
git tag -a vX.Y.Z -m "Version X.Y.Z" - 推送代码:运行。
git push origin main && git push origin vX.Y.Z - NPM发布 — 交由人类完成。人类维护者提出了npm安全要求,因此发布现在需要只有他们能提供的凭据/双因素认证。Agent不得自行运行(或
npm publish/np等会触发发布的命令)。现在将NPM发布工作交给人类: 停止操作并告知他们版本已提交、打标签并推送,他们必须发布到npm以确保npm run release:*可正常解析。提供命令:npx claude-mem@X.Y.Z等待人类确认发布完成,然后验证发布结果:bashnpm publish # 由人类执行 — prepublishOnly脚本会重新构建包如果发布构建修改了本地产物,之后请再次运行bashnpm view claude-mem@X.Y.Z version # 应输出X.Y.Z。npm run build-and-sync - GitHub发布:运行。
gh release create vX.Y.Z --title "vX.Y.Z" --notes "RELEASE_NOTES" - 生成变更日志:通过项目的变更日志脚本重新生成:
(运行bash
npm run changelog:generate,该脚本从GitHub API拉取发布信息并重写node scripts/generate-changelog.js。)CHANGELOG.md - 同步变更日志:提交并推送更新后的。
CHANGELOG.md - 发送通知:从运行Discord通知脚本,该目录下存放着包含Discord webhook信息的
~/Scripts/claude-mem/文件:.env即使发布工作目录中没有本地bashcd ~/Scripts/claude-mem/ && npm run discord:notify vX.Y.Z文件,也要执行此步骤。.env - 最终验证:运行— 工作树必须干净无变更。
git status
Checklist
检查清单
- All eight config files have matching versions
- for old version returns zero hits
git grep - succeeded
npm run build-and-sync - Git tag created and pushed
- NPM publishing handed off to the human (agent does NOT run — human raised security); once they publish,
npm publishconfirms it (sonpm view claude-mem@X.Y.Z versionresolves)npx claude-mem@X.Y.Z - GitHub release created with notes
- updated and pushed
CHANGELOG.md - Discord notification run from
~/Scripts/claude-mem/ - shows clean tree
git status
- 所有8个配置文件的版本号一致
- 搜索旧版本号的命令返回零匹配
git grep - 执行成功
npm run build-and-sync - Git标签已创建并推送
- NPM发布已交由人类完成(Agent不得运行— 出于安全要求由人类执行);发布完成后,
npm publish可验证版本(确保npm view claude-mem@X.Y.Z version可正常解析)npx claude-mem@X.Y.Z - 已创建带发布说明的GitHub发布
- 已更新并推送
CHANGELOG.md - 已从发送Discord通知
~/Scripts/claude-mem/ - 显示工作树干净
git status