release-management
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRelease Management Skill
版本发布管理Skill
Automated releases via semantic-release with unified "v" prefix versioning.
通过semantic-release实现自动化版本发布,采用统一的"v"前缀版本号规则。
How It Works
工作流程
- Commits pushed to trigger
main.github/workflows/release.yml - Checks run first (test + lint matrix)
- semantic-release analyses commits since last tag
- Version bumped based on commit types (see skill)
conventional-commits - updated automatically
CHANGELOG.md - All files updated across the monorepo (
package.json)pnpm -r exec -- npm version - Git tag created with prefix (e.g.,
v)v4.46.0 - GitHub Release created with auto-generated notes
- Release commit created:
chore(release): v{version} [skip ci] - Vercel auto-deploys the new version
- 提交代码到分支时触发
main工作流.github/workflows/release.yml - 首先执行检查环节(测试+代码扫描矩阵任务)
- semantic-release分析上次标签以来的所有提交
- 根据提交类型更新版本号(详见skill)
conventional-commits - 自动更新文件
CHANGELOG.md - 统一更新 monorepo 中所有文件的版本号(使用
package.json命令)pnpm -r exec -- npm version - 创建带"v"前缀的Git标签(例如:)
v4.46.0 - 创建包含自动生成说明的GitHub Release
- 生成发布提交:
chore(release): v{version} [skip ci] - Vercel自动部署新版本
Version Scheme
版本号规则
- Format: (e.g.,
v{major}.{minor}.{patch})v4.46.0 - Unified version across the entire monorepo
- Tag format configured in :
.releaserc.json"tagFormat": "v${version}"
- 格式:(例如:
v{major}.{minor}.{patch})v4.46.0 - 整个monorepo采用统一版本号
- 标签格式在中配置:
.releaserc.json"tagFormat": "v${version}"
Configuration
配置说明
.releaserc.json- — conventionalcommits preset
@semantic-release/commit-analyzer - — conventionalcommits preset
@semantic-release/release-notes-generator - — writes
@semantic-release/changelogCHANGELOG.md - — bumps all package.json versions
@semantic-release/exec - — commits changelog + package.json changes
@semantic-release/git - — creates GitHub Release, adds "released" label
@semantic-release/github
.releaserc.json- — 使用conventionalcommits预设
@semantic-release/commit-analyzer - — 使用conventionalcommits预设
@semantic-release/release-notes-generator - — 写入
@semantic-release/changelog文件CHANGELOG.md - — 更新所有package.json版本号
@semantic-release/exec - — 提交变更日志及package.json的修改
@semantic-release/git - — 创建GitHub Release并添加"released"标签
@semantic-release/github
Checking Release Status
查看发布状态
bash
undefinedbash
undefinedView recent releases
查看最近的发布记录
gh release list --limit 5
gh release list --limit 5
View specific release
查看特定版本的发布详情
gh release view v4.46.0
gh release view v4.46.0
Check release workflow status
检查发布工作流状态
gh run list --workflow=release.yml --limit 5
gh run list --workflow=release.yml --limit 5
View release workflow logs
查看发布工作流日志
gh run view <run-id> --log
undefinedgh run view <run-id> --log
undefinedDebugging Release Failures
排查发布失败问题
Release Not Triggered
发布未触发
- Verify commit type is or
feat(notfix,chore, etc.)docs - Check workflow ran:
gh run list --workflow=release.yml - Verify branch is
main
- 确认提交类型为或
feat(而非fix、chore等类型)docs - 检查工作流是否执行:
gh run list --workflow=release.yml - 确认分支为
main
Version Not Bumped
版本号未更新
- Check commit message format matches conventional commits
- Look for in commit message (release commits include this)
[skip ci]
- 检查提交消息格式是否符合conventional commits规范
- 查看提交消息中是否包含(发布提交会包含该标记)
[skip ci]
Workflow Failed
工作流执行失败
- Check GitHub Actions logs:
gh run view <run-id> --log - Common causes: test failures, lint errors, npm publish issues
- 查看GitHub Actions日志:
gh run view <run-id> --log - 常见原因:测试失败、代码扫描错误、npm发布问题
Manual Release (Emergency Only)
手动发布(仅紧急情况使用)
bash
undefinedbash
undefinedCreate tag manually
手动创建标签
git tag -a v4.47.0 -m "v4.47.0"
git push origin v4.47.0
git tag -a v4.47.0 -m "v4.47.0"
git push origin v4.47.0
Create GitHub release from tag
基于标签创建GitHub Release
gh release create v4.47.0 --generate-notes
undefinedgh release create v4.47.0 --generate-notes
undefinedRelated
相关链接
- See skill for commit message format
conventional-commits - See skill for changelog details
changelog - See skill for rolling back releases
deployment-rollback - Workflow:
.github/workflows/release.yml - Config:
.releaserc.json
- 提交消息格式详见skill
conventional-commits - 变更日志详情详见skill
changelog - 版本回滚详见skill
deployment-rollback - 工作流文件:
.github/workflows/release.yml - 配置文件:
.releaserc.json