release-core-test
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRelease Core (Test)
发布核心包(测试版)
Publish ONLY the package (and if needed) as a dev/test prerelease to npm under the dist-tag. This is a developer convenience for iterating on without going through the full release flow.
cyrus-coreclaude-runnertestcyrus-core仅将包(必要时包含)作为开发/测试预发布版本发布到npm的 dist-tag下。这是为了方便开发者迭代而无需走完整发布流程的便捷操作。
cyrus-coreclaude-runnertestcyrus-coreWhat this skill does NOT do
此技能不包含的操作
This skill is intentionally minimal. It does NOT:
- Update or
CHANGELOG.mdCHANGELOG.internal.md - Create a git tag
- Create a GitHub release
- Move any Linear issues
- Open a pull request
- Commit the version bump (the bumped is left as a local working-tree change)
package.json
It also does NOT publish any other workspace package (no , no CLI, no , etc.). The only exception is , which is republished if and only if its reference would otherwise resolve to an unpublished version (see step 3 below).
edge-workercyruslinear-event-transportclaude-runnerworkspace:*本技能刻意设计得极简,它不会:
- 更新或
CHANGELOG.mdCHANGELOG.internal.md - 创建git标签
- 创建GitHub发布版本
- 移动任何Linear工单
- 发起拉取请求
- 提交版本更新(更新后的仅保留为本地工作区变更)
package.json
它也不会发布任何其他工作区包(不包括、 CLI、等)。唯一的例外是,只有当它的引用指向未发布版本时,才会重新发布(见下方步骤3)。
edge-workercyruslinear-event-transportclaude-runnerworkspace:*Workflow
工作流程
1. Install dependencies from repo root
1. 从仓库根目录安装依赖
bash
pnpm installbash
pnpm install2. Build all packages from repo root
2. 从仓库根目录构建所有包
bash
pnpm buildBuilding all packages ensures dependencies are resolved before publishing.
workspace:*bash
pnpm build构建所有包可确保在发布前解析依赖。
workspace:*3. Determine whether claude-runner
needs republishing
claude-runner3. 判断是否需要重新发布claude-runner
claude-runnercyrus-coreclaude-runnerworkspace:*cyrus-coreworkspace:*packages/claude-runner/package.jsonclaude-runnercyrus-core@testRun both of these deterministic checks:
bash
undefinedcyrus-coreworkspace:*claude-runnercyrus-coreworkspace:*packages/claude-runner/package.jsonclaude-runnercyrus-core@test运行以下两个确定性检查:
bash
undefined(a) Is the local claude-runner version already on npm?
(a) 本地claude-runner版本是否已在npm上?
LOCAL_CR=$(node -p "require('./packages/claude-runner/package.json').version")
npm view "cyrus-claude-runner@${LOCAL_CR}" version 2>/dev/null
LOCAL_CR=$(node -p "require('./packages/claude-runner/package.json').version")
npm view "cyrus-claude-runner@${LOCAL_CR}" version 2>/dev/null
(b) Does claude-runner have uncommitted/unpushed source changes since its last publish?
(b) claude-runner自上次发布后是否有未提交/未推送的源码变更?
git diff --quiet HEAD -- packages/claude-runner/src packages/claude-runner/package.json && echo "clean" || echo "dirty"
Republish `claude-runner` if **either**: (a) returns nothing (local version is not on npm), **or** (b) prints `dirty`. If both pass cleanly, skip this step. If you're unsure, ask the user.
To republish:
```bashgit diff --quiet HEAD -- packages/claude-runner/src packages/claude-runner/package.json && echo "clean" || echo "dirty"
如果以下任一情况成立,则重新发布`claude-runner`:(a) 无返回结果(本地版本未在npm上),**或** (b) 输出`dirty`。如果两项检查均通过,则跳过此步骤。若不确定,请询问用户。
重新发布步骤:
```bashDetermine the next -test.N for claude-runner (same algorithm as cyrus-core below)
确定claude-runner的下一个-test.N版本(与下方cyrus-core的算法相同)
Bump packages/claude-runner/package.json to e.g. 0.0.X-test.N
将packages/claude-runner/package.json更新为例如0.0.X-test.N
cd packages/claude-runner
pnpm publish --access public --no-git-checks --tag test
cd ../..
pnpm install # refresh lockfile so cyrus-core picks up the new claude-runner
Otherwise, skip this step entirely.cd packages/claude-runner
pnpm publish --access public --no-git-checks --tag test
cd ../..
pnpm install # 更新锁文件,使cyrus-core获取新的claude-runner版本
否则,完全跳过此步骤。4. Bump cyrus-core
to the next -test.N
prerelease version
cyrus-core-test.N4. 将cyrus-core
升级到下一个-test.N
预发布版本
cyrus-core-test.NAlgorithm:
- Read the current version from (e.g.
packages/core/package.json).0.1.22 - Bump the patch (e.g. ).
0.1.23 - Append , starting at
-test.Nand incrementing whileN = 0already exists on npm (including aborted/stale prior attempts).<bumped>-test.N
Use this one-liner to find existing versions for the bumped patch and pick the next N:
-test.Nbash
BUMPED=0.1.23 # the patch-bumped base, no suffix
npm view cyrus-core versions --json \
| jq -r '.[]' \
| grep -E "^${BUMPED}-test\.[0-9]+$" \
| awk -F'test.' '{print $2}' \
| sort -n | tail -1算法:
- 从读取当前版本(例如
packages/core/package.json)。0.1.22 - 升级补丁版本(例如)。
0.1.23 - 追加,从
-test.N开始递增,直到N = 0在npm上不存在(包括之前中止/失效的尝试)。<bumped>-test.N
使用以下单行命令查找已存在的补丁升级后的版本并选择下一个N值:
-test.Nbash
BUMPED=0.1.23 # 升级补丁后的基础版本,无后缀
npm view cyrus-core versions --json \
| jq -r '.[]' \
| grep -E "^${BUMPED}-test\.[0-9]+$" \
| awk -F'test.' '{print $2}' \
| sort -n | tail -1If empty, use N=0. Otherwise use (max + 1).
如果无结果,使用N=0。否则使用(最大值 + 1)。
Write the chosen version (e.g. `0.1.23-test.0`) back into `packages/core/package.json`. Do NOT commit this change — leave it as a local working-tree edit so the developer can decide whether to keep it.
将选定的版本(例如`0.1.23-test.0`)写回`packages/core/package.json`。**不要**提交此变更——将其保留为本地工作区编辑,由开发者决定是否保留。5. Publish cyrus-core
with the test
dist-tag
cyrus-coretest5. 以test
dist-tag发布cyrus-core
testcyrus-corebash
cd packages/core
pnpm publish --access public --no-git-checks --tag test
cd ../..Using means:
--tag test- will install this version.
npm install cyrus-core@test - The dist-tag is not moved, so production installs (
latest) are unaffected.npm install cyrus-core
bash
cd packages/core
pnpm publish --access public --no-git-checks --tag test
cd ../..使用意味着:
--tag test- 将安装此版本。
npm install cyrus-core@test - dist-tag不会被改动,因此生产环境安装(
latest)不受影响。npm install cyrus-core
6. Verify the dist-tags landed correctly
6. 验证dist-tag是否正确设置
bash
npm view cyrus-core dist-tagsConfirm that is unchanged from before the publish and now points to the version you just published. If moved, something is wrong — stop and investigate before telling anyone to install it.
latesttestlatestbash
npm view cyrus-core dist-tags确认与发布前保持一致,现在指向你刚发布的版本。如果发生变动,说明出现问题——在告知他人安装前,请停止操作并排查问题。
latesttestlatest7. Print install instructions
7. 打印安装说明
After publishing, print both forms so the developer can copy/paste:
Published cyrus-core@<version> under dist-tag `test`.
Install with:
npm install cyrus-core@test
or pinned:
npm install cyrus-core@<version>If was also republished in step 3, include its version too.
claude-runner发布完成后,打印两种安装方式供开发者复制粘贴:
已将cyrus-core@<version>发布到dist-tag `test`下。
安装方式:
npm install cyrus-core@test
或指定版本:
npm install cyrus-core@<version>如果步骤3中也重新发布了,请同时包含其版本。
claude-runnerKey Notes
关键注意事项
- Always use so you can publish from a feature branch with a dirty working tree.
--no-git-checks - Always use so the
--tag testdist-tag is preserved for real releases.latest - Prerelease versions (anything with a suffix like
-) are never auto-installed by-test.0without an explicit tag or version spec, so this is safe to run repeatedly.npm install cyrus-core - Run after publishing
pnpm install(if applicable) so the lockfile reflects the new published version beforeclaude-runneris built/published.cyrus-core - +
pnpm installfrom root takes ~3 minutes combined on a clean tree — plan command timeouts accordingly.pnpm build
- 始终使用,以便你可以从带有未提交工作区的功能分支进行发布。
--no-git-checks - 始终使用,以保留
--tag testdist-tag用于正式版本。latest - 预发布版本(任何带有后缀的版本,如
-)在没有显式标签或版本规范的情况下,不会被-test.0自动安装,因此可以安全重复执行此流程。npm install cyrus-core - 如果重新发布了(适用时),请在发布后运行
claude-runner,以便在构建/发布pnpm install前,锁文件能反映新发布的版本。cyrus-core - 在干净的工作区中,从根目录运行+
pnpm install总共需要约3分钟——请据此规划命令超时时间。pnpm build
Examples
示例
- "release core test" - Run a dev release of cyrus-core
- "/release-core-test" - Invoke this skill
- "release core test" - 运行cyrus-core的开发版本发布
- "/release-core-test" - 调用此技能