|
| 1 | +--- |
| 2 | +name: release |
| 3 | +description: Run a Cyrus release by publishing all packages to npm in the correct dependency order, updating changelogs, and creating git tags. |
| 4 | +--- |
| 5 | + |
| 6 | +# Release |
| 7 | + |
| 8 | +Publish Cyrus packages to npm and create a release. |
| 9 | + |
| 10 | +## Pre-Publishing Checklist |
| 11 | + |
| 12 | +1. **Update CHANGELOG.md and CHANGELOG.internal.md**: |
| 13 | + - Move items from `## [Unreleased]` to a new versioned section in both files |
| 14 | + - Use the CLI version number (e.g., `## [0.1.22] - 2025-01-06`) |
| 15 | + - CHANGELOG.md: Focus on end-user impact from the perspective of the `cyrus` CLI |
| 16 | + - CHANGELOG.internal.md: Internal development changes, refactors, and tooling updates |
| 17 | + |
| 18 | +2. **Check Linear Issues**: |
| 19 | + - Review all Linear issues mentioned in the Unreleased changelog |
| 20 | + - These will be moved from 'MergedUnreleased' to 'ReleasedMonitoring' after release |
| 21 | + |
| 22 | +3. **Commit all changes**: |
| 23 | + ```bash |
| 24 | + git add -A |
| 25 | + git commit -m "Prepare release v0.1.XX" |
| 26 | + git push |
| 27 | + ``` |
| 28 | + |
| 29 | +## Publishing Workflow |
| 30 | + |
| 31 | +### 1. Install dependencies from root |
| 32 | +```bash |
| 33 | +pnpm install # Ensures all workspace dependencies are up to date |
| 34 | +``` |
| 35 | + |
| 36 | +### 2. Build all packages from root first |
| 37 | +```bash |
| 38 | +pnpm build # Builds all packages to ensure dependencies are resolved |
| 39 | +``` |
| 40 | + |
| 41 | +### 3. Publish packages in dependency order |
| 42 | + |
| 43 | +**IMPORTANT**: Publish in this exact order to avoid dependency resolution issues: |
| 44 | + |
| 45 | +```bash |
| 46 | +# 1. Packages with no internal dependencies |
| 47 | +cd packages/cloudflare-tunnel-client && pnpm publish --access public --no-git-checks |
| 48 | +cd ../.. |
| 49 | +pnpm install # Update lockfile |
| 50 | + |
| 51 | +cd packages/claude-runner && pnpm publish --access public --no-git-checks |
| 52 | +cd ../.. |
| 53 | +pnpm install # Update lockfile |
| 54 | + |
| 55 | +# 2. Core package (depends on claude-runner) |
| 56 | +cd packages/core && pnpm publish --access public --no-git-checks |
| 57 | +cd ../.. |
| 58 | +pnpm install # Update lockfile |
| 59 | + |
| 60 | +# 3. Simple agent runner (depends on claude-runner) |
| 61 | +cd packages/simple-agent-runner && pnpm publish --access public --no-git-checks |
| 62 | +cd ../.. |
| 63 | +pnpm install # Update lockfile |
| 64 | + |
| 65 | +# 4. Packages that depend on core |
| 66 | +cd packages/linear-event-transport && pnpm publish --access public --no-git-checks |
| 67 | +cd ../.. |
| 68 | +pnpm install # Update lockfile |
| 69 | + |
| 70 | +cd packages/config-updater && pnpm publish --access public --no-git-checks |
| 71 | +cd ../.. |
| 72 | +pnpm install # Update lockfile |
| 73 | + |
| 74 | +# 5. Gemini runner (depends on claude-runner, core, simple-agent-runner) |
| 75 | +cd packages/gemini-runner && pnpm publish --access public --no-git-checks |
| 76 | +cd ../.. |
| 77 | +pnpm install # Update lockfile |
| 78 | + |
| 79 | +# 6. Edge worker (depends on all packages above) |
| 80 | +cd packages/edge-worker && pnpm publish --access public --no-git-checks |
| 81 | +cd ../.. |
| 82 | +pnpm install # Update lockfile |
| 83 | +``` |
| 84 | + |
| 85 | +### 4. Publish the CLI |
| 86 | +```bash |
| 87 | +pnpm install # Final install to ensure all deps are latest |
| 88 | +cd apps/cli && pnpm publish --access public --no-git-checks |
| 89 | +cd ../.. |
| 90 | +``` |
| 91 | + |
| 92 | +### 5. Create git tag and push |
| 93 | +```bash |
| 94 | +git tag v0.1.XX |
| 95 | +git push origin <branch-name> |
| 96 | +git push origin v0.1.XX |
| 97 | +``` |
| 98 | + |
| 99 | +### 6. Create GitHub Release |
| 100 | +Create a GitHub release using the changelog notes as the content: |
| 101 | +```bash |
| 102 | +gh release create v0.1.XX --title "v0.1.XX" --notes-file - << 'EOF' |
| 103 | +<paste the changelog notes for this version here> |
| 104 | +EOF |
| 105 | +``` |
| 106 | + |
| 107 | +Or interactively: |
| 108 | +```bash |
| 109 | +gh release create v0.1.XX --title "v0.1.XX" --notes "$(cat CHANGELOG.md | sed -n '/## \[0.1.XX\]/,/## \[/p' | head -n -1)" |
| 110 | +``` |
| 111 | + |
| 112 | +### 7. Update Linear Issues |
| 113 | +After a successful release, move each Linear issue mentioned in the changelog from 'MergedUnreleased' (Done) status to 'ReleasedMonitoring' (also Done) status. |
| 114 | + |
| 115 | +## Key Notes |
| 116 | + |
| 117 | +- Always use `--no-git-checks` flag to publish from feature branches |
| 118 | +- Run `pnpm install` after each publish to update the lockfile |
| 119 | +- The `simple-agent-runner` package MUST be published before `edge-worker` |
| 120 | +- Build all packages once at the start, then publish without rebuilding |
| 121 | +- This ensures `workspace:*` references resolve to published versions |
| 122 | + |
| 123 | +## Examples |
| 124 | + |
| 125 | +- "release" - Run the full release process |
| 126 | +- "/release" - Invoke the release skill |
0 commit comments