release 是一个面向 designer-skill-mcp 的发布流程技能,用于把一次完整发布按固定顺序执行:版本号提升 → 构建/测试 → 提交 → 打标签 → 推送 → 发布到 npm → 创建 GitHub Release。
用途 当用户要求 ship、publish、cut a release、bump version、push tags 或运行发布脚本时使用。
默认版本提升规则 每次发布默认将次版本号加 0.1.0,并把补丁号重置为 0,除非向脚本传入显式 semver。规则为 {major}.{minor + 1}.0,从不自动提升补丁号。仅在热修复时使用显式版本,例如 ./scripts/release.sh 0.11.1 "hotfix"。示例:0.10.0 → 0.11.0;0.11.0 → 0.12.0;0.9.1 → 0.10.0。
预检 先提交并推送所有功能工作,发布脚本只提交版本提升相关文件。工作区必须干净,除有意的发布编辑外。npm whoami 必须成功(以 @pymodel/designer-skill-mcp 的发布者身份登录)。gh auth status 必须成功(活动账号:elkaix,main 分支有分支保护)。发布后需更新 README.md 和 commands/designer-setup.md 中的文档固定版本(@latest → @<新版本>)。
版本触点(需保持同步) designer-skill-mcp/package.json 的 "version";designer-skill-mcp/package-lock.json 顶层 "version";designer-skill-mcp/server.json 的 "version" 与 packages[0].version;.claude-plugin/plugin.json 的 "version";.codex-plugin/plugin.json 的 "version";.cursor-plugin/plugin.json 的 "version";README.md 的固定示例(@0.11.0);commands/designer-setup.md 的固定示例(@0.11.0)。标签格式为 v{semver},例如 v0.11.0。
自动化方式(推荐) 在仓库根目录执行:chmod +x scripts/release.sh;默认自动提升次版本(+0.1.0),例如 0.10.0 → 0.11.0:./scripts/release.sh "Short release notes for GitHub and the tag body.";仅在需要补丁或主版本提升时覆盖:./scripts/release.sh 0.11.1 "Hotfix: …" 或 ./scripts/release.sh 1.0.0 "Breaking: …"。 脚本执行序列:解析版本(自动次版本提升或使用显式 semver);在 designer-skill-mcp/ 中执行 npm version <semver> --no-git-tag-version;同步插件清单与 server.json;运行 npm run build 与 npm test;以发布消息提交版本文件;创建附注标签 v<semver>;git push origin HEAD 与 git push origin v<semver>;在 designer-skill-mcp/ 中执行 npm publish --access public;在 designer-skill-mcp/ 中执行 mcp-publisher publish(若已安装并登录);gh release create v<semver>;更新 README.md 与 commands/designer-setup.md 的固定示例,提交并推送。
手动序列(不使用脚本时) cd designer-skill-mcp;npm version 0.11.0 --no-git-tag-version --allow-same-version;同步 plugin.json 与 server.json 版本(见上表);npm run build && npm test;cd ..;git add designer-skill-mcp/package.json designer-skill-mcp/package-lock.json designer-skill-mcp/server.json .claude-plugin/plugin.json .codex-plugin/plugin.json .cursor-plugin/plugin.json;git commit -m "Release designer-skill-mcp v0.11.0.";git tag -a v0.11.0 -m "designer-skill-mcp v0.11.0";git push origin HEAD && git push origin v0.11.0;cd designer-skill-mcp && npm publish --access public;(cd designer-skill-mcp && mcp-publisher publish) 2>/dev/null || true;gh release create v0.11.0 --title "designer-skill-mcp v0.11.0" --notes "Release notes."。
验证 git tag -l 'v0.1*';npm view @pymodel/designer-skill-mcp version;gh release view v0.11.0;cd designer-skill-mcp && npm test。
禁止事项 不要在发布前跳过 npm test 或 npm run build(prepublishOnly 也会运行它们,但应先本地验证)。不要从脏工作区发布,或未提交版本提升就发布。除非明确在恢复失败的发布,否则不要在 npm publish 上使用 --force。不要在提交或标签消息中添加 Co-authored-by 或代理归属行。不要为常规发布自动提升补丁号——默认始终是 +0.1.0 次版本。
适用场景 适用于 designer-skill-mcp 的版本发布、npm 发布、GitHub Release 创建、标签推送与版本号同步等流程。
限制 该技能针对特定仓库与包(@pymodel/designer-skill-mcp),依赖 npm、gh、mcp-publisher 等工具及相应登录状态;具体脚本内容、构建与测试细节、发布说明格式等资料未提供。