Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .claude/skills/release/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: release
description: Use when releasing a new version of aitool-cli to production
---

# Release

Releases are driven by git tags. Pushing a `v*` tag triggers the GitHub Actions release workflow, which builds all platform binaries and publishes a GitHub Release.

## Process

1. Ensure `main` is clean and all changes are committed and pushed.
2. Bump the version and create a tag:

```sh
bun run release # patch bump (1.4.1 → 1.4.2)
bun run release:minor # minor bump (1.4.1 → 1.5.0)
bun run release:major # major bump (1.4.1 → 2.0.0)
```

3. Push the commit and tag together:

```sh
git push origin main --tags
```

That's it. The CI release workflow handles the rest.

## What `bun run release` does

Runs `npm version patch --message 'chore: release v%s'`, which:
- Bumps the version in `package.json`
- Creates a commit with message `chore: release vX.Y.Z`
- Creates an annotated git tag `vX.Y.Z`

## Common mistakes

| Mistake | Fix |
| --- | --- |
| `git push` without `--tags` | Tag never reaches remote; CI never fires. Always use `--tags`. |
| Running release on a dirty tree | Commit or stash changes first. |
| Pushing the tag before `main` | Push both together: `git push origin main --tags`. |
2 changes: 1 addition & 1 deletion src/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export async function selfUpdate(): Promise<void> {
console.log(`\nDownloaded new binary to: ${dest}`);
console.log(
`To complete the update, replace the current binary:\n` +
` move /Y "${dest}" "${process.execPath}"`,
` Move-Item -Force "${dest}" "${process.execPath}"`,
);
return;
}
Expand Down