feat(release): add scripts/release.sh single-command release flow#100
Merged
George-iam merged 1 commit intomainfrom Apr 11, 2026
Merged
feat(release): add scripts/release.sh single-command release flow#100George-iam merged 1 commit intomainfrom
George-iam merged 1 commit intomainfrom
Conversation
The v0.2.7 release took ~5 retries due to drift between manual steps:
forgotten badge bumps, npm not logged in, plugin clones in /tmp instead
of workspace, GitHub Actions anti-recursion breaking the workflow chain.
This script eliminates every one of those failure modes.
Usage:
./scripts/release.sh patch # 0.2.7 → 0.2.8
./scripts/release.sh minor # 0.2.7 → 0.3.0
./scripts/release.sh major # 0.2.7 → 1.0.0
./scripts/release.sh patch --dry-run
What it does (in order):
1. Preflight checks (fail fast before doing real work):
- Required tools present (git, gh, npm, node, jq)
- Clean working tree (untracked .claude/ and CLAUDE.md allowed)
- On main, in sync with origin
- npm authenticated (npm whoami) — caught the v0.2.7 401 immediately
- gh CLI authenticated
- npm run lint, test, build all pass
- CHANGELOG.md has the [X.Y.Z] section per D-128 (required decision),
aborts with instructions if missing
2. Bump version in 3 files in lockstep:
- package.json (via jq)
- .claude-plugin/plugin.json (via jq)
- templates/plugin-README.md (badge URL via sed)
Verifies no stale references to old version remain.
3. Create release branch (release/vX.Y.Z), commit, push, open PR
with body extracted from the matching CHANGELOG section.
4. Pause and wait for user to merge the PR.
5. After merge: pull main, verify version is bumped, tag, push tag.
This triggers the chained release-binary workflow (build matrix →
release → publish-npm → sync-plugin-repo).
6. Watch the workflow with gh run watch --exit-status, fail loudly with
the run URL if any job failed.
7. Postflight verify all three artifact landed:
- npm view @axme/code version
- gh release view vX.Y.Z (asset count)
- gh api repos/AxmeAI/axme-code-plugin/contents/.claude-plugin/plugin.json
Idempotent where possible: re-running after a partial failure picks up
where it left off (existing branch, existing tag are recognized and
not re-created).
Smoke tested locally: preflight correctly aborts on dirty tree.
Full end-to-end will be validated on the next release (v0.2.8).
Also documented in README under "Releasing" section.
Closes B-004.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Single-command release script. Eliminates the manual ritual that caused 5 retries during v0.2.7 release.
Usage
```bash
./scripts/release.sh patch # 0.2.7 → 0.2.8
./scripts/release.sh minor # 0.2.7 → 0.3.0
./scripts/release.sh major # 0.2.7 → 1.0.0
./scripts/release.sh patch --dry-run
```
What it does
Idempotent: re-running after a partial failure recognizes existing branch/tag and continues.
What this fixes vs v0.2.7 release
Smoke test
Locally tested: preflight correctly aborts when working tree is dirty. Full end-to-end will be validated on v0.2.8.
Files
Closes
B-004 (backlog)
🤖 Generated with Claude Code