release
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRelease
发布
End-to-end release workflow for vercel-plugin.
vercel-plugin的端到端发布工作流。
Workflow
工作流
1. Pre-flight checks
1. 发布前检查
Run all gates in parallel:
bash
bun run typecheck # tsc --noEmit on hooks/src
bun test # all test files
bun run validate # skill frontmatter + manifest integrityStop if any gate fails. Fix issues before proceeding.
并行运行所有门禁检查:
bash
bun run typecheck # tsc --noEmit on hooks/src
bun test # all test files
bun run validate # skill frontmatter + manifest integrity任意门禁检查不通过则停止流程。 先修复问题再继续。
2. Determine version bump
2. 确定版本升级幅度
Read the current version from . Ask the user which semver component to bump if not specified:
.plugin/plugin.json| Bump | When |
|---|---|
| patch | Bug fixes, test/fixture updates, docs |
| minor | New skills, new hooks, new features |
| major | Breaking changes to hook API or skill map |
Default to patch if the user says "release" without specifying.
从读取当前版本。如果未指定升级类型,询问用户需要升级semver的哪个部分:
.plugin/plugin.json| 升级类型 | 适用场景 |
|---|---|
| patch | Bug修复、测试/用例更新、文档优化 |
| minor | 新增skill、新增hook、新增功能 |
| major | Hook API或skill映射出现不兼容变更 |
如果用户只说"release"没有指定版本类型,默认升级patch版本。
3. Bump version
3. 升级版本
Update the field in . This is the only version source of truth.
version.plugin/plugin.json更新中的字段,这是唯一的版本可信来源。
.plugin/plugin.jsonversion4. Rebuild generated artifacts
4. 重新构建生成产物
bash
bun run build # hooks (tsup) + manifestThis compiles → and regenerates .
hooks/src/*.mtshooks/*.mjsgenerated/skill-manifest.jsonbash
bun run build # hooks (tsup) + manifest该命令会将编译为,并重新生成。
hooks/src/*.mtshooks/*.mjsgenerated/skill-manifest.json5. Stage, commit, and push
5. 暂存、提交并推送
bash
git add -A
git commit -m "<summary>; bump to <new-version>"
git pushCommit message style: match existing convention — descriptive summary followed by (see git log for examples).
; bump to X.Y.ZThe pre-commit hook will re-run typecheck and recompile hooks automatically. If it fails, fix the issue and create a new commit (never amend).
bash
git add -A
git commit -m "<summary>; bump to <new-version>"
git push提交信息格式:遵循现有规范 — 描述性摘要后跟上(可参考git日志中的示例)。
; bump to X.Y.Zpre-commit钩子会自动重新执行类型检查和hook编译。如果执行失败,修复问题后创建新的提交(不要执行amend操作)。
Version source of truth
版本可信来源
.plugin/plugin.jsonversionpackage.json.plugin/plugin.jsonversionpackage.jsonChecklist (copy into your reasoning)
检查清单(可复制到你的推理过程中)
- typecheck passes
- tests pass
- validate passes
- version bumped
.plugin/plugin.json - succeeded
bun run build - commit includes all changes
- pushed to main
- 类型检查通过
- 测试通过
- 验证通过
- 版本已升级
.plugin/plugin.json - 执行成功
bun run build - 提交包含所有变更
- 已推送到main分支