release

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Release

发布

Steps

步骤

bash
undefined
bash
undefined

1. Commit all changes first

1. 先提交所有更改

2. Bump version (patch / minor / major)

2. 升级版本(补丁版 / 次版本 / 主版本)

npm version <patch|minor|major> -m "chore: bump version to %s"
npm version <patch|minor|major> -m "chore: bump version to %s"

3. Push commit and tag

3. 提交代码并推送标签

git push && git push --tags

CI will automatically run tests, publish to npm, and create a GitHub Release.
git push && git push --tags

CI 会自动运行测试、发布至 npm 并创建 GitHub Release。

Rules

规则

  • Always pass
    -m "chore: bump version to %s"
    to
    npm version
  • Tag format:
    v*
    (e.g.
    v0.2.0
    ), this is npm's default
  • Do NOT manually edit
    version
    in
    package.json
    — always use
    npm version
  • Do NOT manually create tags —
    npm version
    creates them
  • Ensure all changes are committed before running
    npm version
  • CI requires the GitHub repo to be public (for
    --provenance
    )
  • npm trusted publishing via OIDC — no
    NPM_TOKEN
    secret needed, configured on npmjs.com
  • 执行
    npm version
    时必须添加
    -m "chore: bump version to %s"
    参数
  • 标签格式:
    v*
    (例如
    v0.2.0
    ),这是 npm 的默认格式
  • 请勿手动修改
    package.json
    中的
    version
    字段 —— 请始终使用
    npm version
    命令
  • 请勿手动创建标签 ——
    npm version
    会自动创建标签
  • 执行
    npm version
    前请确保所有更改已提交
  • CI 要求 GitHub 仓库为公开状态(以支持
    --provenance
    参数)
  • 通过 OIDC 实现 npm 可信发布 —— 无需
    NPM_TOKEN
    密钥,需在 npmjs.com 上完成配置