nemoclaw-maintainer-cut-release-tag

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Cut Release Tag

创建发布标签

Bump all version strings, open a release PR, and after merge create annotated semver +
latest
tags on
origin/main
.
This skill delegates the version-bump work to
scripts/bump-version.ts
(invoked via
npm run bump:version
). That script updates package.json (root + plugin), blueprint.yaml, installer defaults, docs config, and versioned doc links — then runs the build and tests before opening a PR.
更新所有版本字符串,打开发布PR,合并后在
origin/main
上创建带注释的semver标签和
latest
标签。
本技能将版本更新工作委托给
scripts/bump-version.ts
(通过
npm run bump:version
调用)。该脚本会更新package.json(根目录及插件)、blueprint.yaml、安装程序默认配置、文档配置和版本化文档链接——随后在打开PR前运行构建和测试。

Prerequisites

前提条件

  • You must be in the NemoClaw git repository.
  • You must have push access to
    origin
    (NVIDIA/NemoClaw).
  • The nightly E2E suite should have passed before tagging. Check with the user if unsure.
  • 你必须处于NemoClaw git仓库中。
  • 你必须拥有
    origin
    (NVIDIA/NemoClaw)的推送权限。
  • 打标签前夜间E2E测试套件应已通过。若不确定,请询问用户。

Step 1: Determine the Current Version

步骤1:确定当前版本

Fetch all tags and find the latest semver tag:
bash
git fetch origin --tags
git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1
Parse the major, minor, and patch components from this tag.
拉取所有标签并找到最新的semver标签:
bash
git fetch origin --tags
git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1
从该标签中解析主版本号、次版本号和修订版本号组件。

Step 2: Ask the User Which Bump

步骤2:询问用户版本更新类型

Present the options with the patch bump as default:
  • Patch (default):
    vX.Y.(Z+1)
    — bug fixes, small changes
  • Minor:
    vX.(Y+1).0
    — new features, larger changes
  • Major:
    v(X+1).0.0
    — breaking changes
Show the concrete version strings. Example prompt:
Current tag:
v0.0.2
Which version bump?
  1. Patch
    v0.0.3
    (default)
  2. Minor
    v0.1.0
  3. Major
    v1.0.0
Wait for the user to confirm before proceeding. If they just say "yes", "go", "do it", or similar, use the patch default.
提供以下选项,默认选择修订版本更新
  • 修订版本(Patch)(默认):
    vX.Y.(Z+1)
    —— bug修复、小改动
  • 次版本(Minor)
    vX.(Y+1).0
    —— 新功能、较大改动
  • 主版本(Major)
    v(X+1).0.0
    —— 破坏性变更
展示具体的版本字符串示例。示例提示:
当前标签:
v0.0.2
选择哪种版本更新类型?
  1. 修订版本
    v0.0.3
    (默认)
  2. 次版本
    v0.1.0
  3. 主版本
    v1.0.0
等待用户确认后再继续。如果用户仅回复“yes”、“开始”、“执行”或类似内容,则使用默认的修订版本更新。

Step 3: Show What's Being Tagged

步骤3:展示待打标签的内容

Show the user the commit that will be tagged and the changelog since the last tag:
bash
git log --oneline origin/main -1
git log --oneline <previous-tag>..origin/main
Ask for confirmation before proceeding.
向用户展示将被打标签的提交记录以及自上一个标签以来的变更日志:
bash
git log --oneline origin/main -1
git log --oneline <previous-tag>..origin/main
继续前请用户确认。

Step 4: Run the Version Bump Script

步骤4:运行版本更新脚本

First, preview the plan with
--dry-run
:
bash
npm run bump:version -- <version-without-v-prefix> --dry-run
Show the dry-run output to the user. After confirmation, ask the user which mode they want:
首先,使用
--dry-run
预览计划:
bash
npm run bump:version -- <version-without-v-prefix> --dry-run
向用户展示试运行输出。确认后,询问用户想要使用哪种模式:

Option A: PR mode (default, recommended)

选项A:PR模式(默认,推荐)

bash
npm run bump:version -- <version-without-v-prefix>
This will:
  1. Update all version strings across the repo
  2. Run the build and tests
  3. Create a
    release/<version>
    branch and open a release PR against
    main
In PR mode, tagging is deferred — proceed to Step 5 after the PR merges.
bash
npm run bump:version -- <version-without-v-prefix>
该模式会:
  1. 更新仓库中所有版本字符串
  2. 运行构建和测试
  3. 创建
    release/<version>
    分支并针对
    main
    打开发布PR
在PR模式下,打标签操作会延后——PR合并后再进行步骤5。

Option B: Direct mode (no PR)

选项B:直接模式(无PR)

bash
npm run bump:version -- <version-without-v-prefix> --no-create-pr --push
This will:
  1. Update all version strings across the repo
  2. Run the build and tests
  3. Commit directly on
    main
  4. Create annotated
    v<version>
    and
    latest
    tags
  5. Push the commit and both tags to origin
In direct mode, tagging and pushing are handled by the script — skip to Step 6.
If the user wants to skip tests (e.g., they already ran them), add
--skip-tests
to either mode.
bash
npm run bump:version -- <version-without-v-prefix> --no-create-pr --push
该模式会:
  1. 更新仓库中所有版本字符串
  2. 运行构建和测试
  3. 直接在
    main
    分支提交变更
  4. 创建带注释的
    v<version>
    标签和
    latest
    标签
  5. 将提交记录和两个标签推送到origin
在直接模式下,脚本会处理打标签和推送操作——跳过步骤5直接进入步骤6。
如果用户想要跳过测试(例如已自行运行过测试),可在任一模式中添加
--skip-tests
参数。

Step 5: Create and Push Tags (PR mode only, after PR merge)

步骤5:创建并推送标签(仅PR模式,PR合并后)

Skip this step if you used direct mode in Step 4 — the script already tagged and pushed.
Once the release PR is merged into
main
, create the annotated tag, move
latest
, and push:
bash
git fetch origin main --tags
git tag -a <new-version> origin/main -m "<new-version>"
若步骤4中使用了直接模式,则跳过此步骤——脚本已完成打标签和推送操作。
发布PR合并到
main
后,创建带注释的标签,移动
latest
标签并推送:
bash
git fetch origin main --tags
git tag -a <new-version> origin/main -m "<new-version>"

Move the latest tag (delete old, create new)

移动latest标签(删除旧标签,创建新标签)

git tag -d latest 2>/dev/null || true git tag -a latest origin/main -m "latest"
git tag -d latest 2>/dev/null || true git tag -a latest origin/main -m "latest"

Push both tags (force-push latest since it moves)

推送两个标签(因latest标签移动,需强制推送)

git push origin <new-version> git push origin latest --force
undefined
git push origin <new-version> git push origin latest --force
undefined

Step 6: Verify

步骤6:验证

bash
git ls-remote --tags origin | grep -E '(<new-version>|latest)'
Confirm both tags point to the same commit on the remote.
bash
git ls-remote --tags origin | grep -E '(<new-version>|latest)'
确认远程仓库中两个标签指向同一个提交记录。

Important Notes

重要注意事项

  • NEVER tag without explicit user confirmation of the version.
  • NEVER tag a branch other than
    origin/main
    .
  • Always use annotated tags (
    -a
    ), not lightweight tags.
  • The
    latest
    tag is a floating tag that always points to the most recent release — it requires
    --force
    to push.
  • The version string passed to
    npm run bump:version
    should NOT have a
    v
    prefix (e.g.,
    0.0.3
    , not
    v0.0.3
    ). The script adds the
    v
    prefix for tags internally.
  • 未经用户明确确认版本,切勿打标签。
  • 切勿为
    origin/main
    以外的分支打标签。
  • 始终使用带注释的标签(
    -a
    ),而非轻量标签。
  • latest
    是浮动标签,始终指向最新发布版本——推送时需要使用
    --force
    参数。
  • 传递给
    npm run bump:version
    的版本字符串不应带有
    v
    前缀(例如
    0.0.3
    ,而非
    v0.0.3
    )。脚本会在内部为标签添加
    v
    前缀。