release

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Release

版本发布

Publish Cyrus packages to npm and create a release.
将Cyrus包发布到npm并创建版本。

Pre-Publishing Checklist

发布前检查清单

  1. Update CHANGELOG.md and CHANGELOG.internal.md:
    • Move items from
      ## [Unreleased]
      to a new versioned section in both files
    • Use the CLI version number (e.g.,
      ## [0.1.22] - 2025-01-06
      )
    • CHANGELOG.md: Focus on end-user impact from the perspective of the
      cyrus
      CLI
    • CHANGELOG.internal.md: Internal development changes, refactors, and tooling updates
  2. Check Linear Issues:
    • Review all Linear issues mentioned in the Unreleased changelog
    • These will be moved from 'MergedUnreleased' to 'ReleasedMonitoring' after release
  3. Commit all changes:
    bash
    git add -A
    git commit -m "Prepare release v0.1.XX"
    git push
  1. 更新CHANGELOG.md和CHANGELOG.internal.md
    • 把两个文件中
      ## [Unreleased]
      下的条目移动到新的版本章节中
    • 使用CLI版本号(例如
      ## [0.1.22] - 2025-01-06
    • CHANGELOG.md:从
      cyrus
      CLI的角度出发,侧重对终端用户的影响
    • CHANGELOG.internal.md:记录内部开发变更、重构和工具更新
  2. 检查Linear议题
    • 审核未发布变更日志中提到的所有Linear议题
    • 发布后这些议题的状态将从'MergedUnreleased'改为'ReleasedMonitoring'
  3. 提交所有变更
    bash
    git add -A
    git commit -m "Prepare release v0.1.XX"
    git push

Publishing Workflow

发布工作流

1. Install dependencies from root

1. 在根目录安装依赖

bash
pnpm install  # Ensures all workspace dependencies are up to date
bash
pnpm install  # Ensures all workspace dependencies are up to date

2. Build all packages from root first

2. 首先在根目录构建所有包

bash
pnpm build  # Builds all packages to ensure dependencies are resolved
bash
pnpm build  # Builds all packages to ensure dependencies are resolved

3. Publish packages in dependency order

3. 按依赖顺序发布包

IMPORTANT: Publish in this exact order to avoid dependency resolution issues:
bash
undefined
重要提示:严格按照以下顺序发布,避免依赖解析问题:
bash
undefined

1. Packages with no internal dependencies

1. Packages with no internal dependencies

cd packages/cloudflare-tunnel-client && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile
cd packages/claude-runner && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile
cd packages/cloudflare-tunnel-client && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile
cd packages/claude-runner && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile

2. Core package (depends on claude-runner)

2. Core package (depends on claude-runner)

cd packages/core && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile
cd packages/core && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile

3. Simple agent runner (depends on claude-runner)

3. Simple agent runner (depends on claude-runner)

cd packages/simple-agent-runner && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile
cd packages/simple-agent-runner && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile

4. Packages that depend on core

4. Packages that depend on core

cd packages/linear-event-transport && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile
cd packages/config-updater && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile
cd packages/linear-event-transport && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile
cd packages/config-updater && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile

5. Gemini runner (depends on claude-runner, core, simple-agent-runner)

5. Gemini runner (depends on claude-runner, core, simple-agent-runner)

cd packages/gemini-runner && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile
cd packages/gemini-runner && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile

6. Edge worker (depends on all packages above)

6. Edge worker (depends on all packages above)

cd packages/edge-worker && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile
undefined
cd packages/edge-worker && pnpm publish --access public --no-git-checks cd ../.. pnpm install # Update lockfile
undefined

4. Publish the CLI

4. 发布CLI

bash
pnpm install  # Final install to ensure all deps are latest
cd apps/cli && pnpm publish --access public --no-git-checks
cd ../..
bash
pnpm install  # Final install to ensure all deps are latest
cd apps/cli && pnpm publish --access public --no-git-checks
cd ../..

5. Create git tag and push

5. 创建git标签并推送

bash
git tag v0.1.XX
git push origin <branch-name>
git push origin v0.1.XX
bash
git tag v0.1.XX
git push origin <branch-name>
git push origin v0.1.XX

6. Create GitHub Release

6. 创建GitHub Release

Create a GitHub release using the changelog notes as the content:
bash
gh release create v0.1.XX --title "v0.1.XX" --notes-file - << 'EOF'
<paste the changelog notes for this version here>
EOF
Or interactively:
bash
gh release create v0.1.XX --title "v0.1.XX" --notes "$(cat CHANGELOG.md | sed -n '/## \[0.1.XX\]/,/## \[/p' | head -n -1)"
使用变更日志内容作为正文创建GitHub Release:
bash
gh release create v0.1.XX --title "v0.1.XX" --notes-file - << 'EOF'
<paste the changelog notes for this version here>
EOF
或者交互式创建:
bash
gh release create v0.1.XX --title "v0.1.XX" --notes "$(cat CHANGELOG.md | sed -n '/## \[0.1.XX\]/,/## \[/p' | head -n -1)"

7. Update Linear Issues

7. 更新Linear议题

After a successful release, move each Linear issue mentioned in the changelog from 'MergedUnreleased' (Done) status to 'ReleasedMonitoring' (also Done) status.
发布成功后,将变更日志中提到的每个Linear议题的状态从'MergedUnreleased'(已完成)修改为'ReleasedMonitoring'(已完成)。

8. Create Pull Request

8. 创建拉取请求

IMPORTANT: Always create a PR to merge the release changes back to main:
bash
gh pr create --title "Release v0.1.XX" --body "$(cat <<'EOF'
重要提示:始终创建PR将发布变更合并回main分支:
bash
gh pr create --title "Release v0.1.XX" --body "$(cat <<'EOF'

Summary

Summary

  • Release v0.1.XX to npm
  • Update changelogs
  • Create git tag
  • Release v0.1.XX to npm
  • Update changelogs
  • Create git tag

Changes

Changes

  • CHANGELOG.md updated with v0.1.XX release notes
  • CHANGELOG.internal.md updated
  • Package versions bumped to 0.1.XX
  • CHANGELOG.md updated with v0.1.XX release notes
  • CHANGELOG.internal.md updated
  • Package versions bumped to 0.1.XX

Links

Links

🤖 Generated with Claude Code EOF )"
undefined
🤖 Generated with Claude Code EOF )"
undefined

Key Notes

关键注意事项

  • Always use
    --no-git-checks
    flag to publish from feature branches
  • Run
    pnpm install
    after each publish to update the lockfile
  • The
    simple-agent-runner
    package MUST be published before
    edge-worker
  • Build all packages once at the start, then publish without rebuilding
  • This ensures
    workspace:*
    references resolve to published versions
  • 始终使用
    --no-git-checks
    参数从功能分支发布
  • 每次发布后运行
    pnpm install
    更新锁文件
  • simple-agent-runner
    包必须在
    edge-worker
    之前发布
  • 开始时构建所有包一次,后续发布无需重新构建
  • 这样可以确保
    workspace:*
    引用解析为已发布的版本

Examples

示例

  • "release" - Run the full release process
  • "/release" - Invoke the release skill
  • "release" - 运行完整的发布流程
  • "/release" - 调用发布skill