r-util-js/docs/RELEASE.md

66 lines
1010 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 发布流程
本文档描述维护者发布 `@r-utils` monorepo 包的标准流程。
## 前置条件
- Node.js >= 18.12.0
- pnpm >= 10.0.0
- 已登录目标 npm 仓库(默认使用各包 `publishConfig.registry`
```bash
pnpm install
```
## 推荐发布流程(分步)
### 1. 记录变更changeset
```bash
pnpm changeset
pnpm changeset:status
```
### 2. 质量检查与构建
```bash
pnpm release:check
```
`release:check` 会依次执行:
- `pnpm test`
- `pnpm build`
### 3. 更新版本号与 CHANGELOG
```bash
pnpm release
```
该命令等价于 `changeset version`,会更新受影响包版本及 changelog。
### 4. 发布到 npm 仓库
```bash
pnpm release:publish
```
该命令等价于 `changeset publish`
## 一键发布(维护者)
```bash
pnpm release:all
```
`release:all` 会按顺序执行:
1. `pnpm release:check`
2. `pnpm release`
3. `pnpm release:publish`
## 发布后建议
发布完成后,手动提交并推送版本相关变更与 tag。