Skip to content

0.5.2 — release script + GitHub Release procedure#6

Merged
wenqingyu merged 1 commit into
mainfrom
chore/release-script
Apr 29, 2026
Merged

0.5.2 — release script + GitHub Release procedure#6
wenqingyu merged 1 commit into
mainfrom
chore/release-script

Conversation

@wenqingyu
Copy link
Copy Markdown
Owner

Summary

Adds a one-shot release script (`npm run release`) that handles tag-and-publish + GitHub Release creation in one go. Closes the gap that surfaced in 0.5.0 / 0.5.1: tags got pushed to origin but no GitHub Release entries were created, so the project's releases page was stuck at v0.3.9.

Changes

  • `scripts/release.mjs` — automated release flow:
    • Verifies clean `main` synced with origin
    • Refuses to clobber existing tags
    • Verifies CHANGELOG has a section for the version in `package.json`
    • Runs `npm run build` (whose drift guard validates all 5 version literals match)
    • Runs `npm test`
    • Tags + pushes + `gh release create --latest` with the CHANGELOG body
  • `npm run release` / `npm run release:dry-run` package scripts
  • CONTRIBUTING.md — "Cutting a release" section documents the maintainer procedure end to end, calling out the five duplicated version literals (with `plugin/.claude-plugin/plugin.json` flagged as the one Claude Code's loader actually reads — that's the file 0.4.0 and 0.4.1 forgot to bump)
  • Backfilled GitHub Releases for v0.4.0 → v0.5.1 with their CHANGELOG bodies (done out-of-band before this PR)

Test plan

  • `npm run typecheck` — clean
  • `npm test` — 117 passing
  • `npm run build` — drift guard validates 5 literals at 0.5.2
  • `node scripts/release.mjs --dry-run` from a non-main branch fails with the expected precondition message
  • After merge: `npm run release` from `main` to dogfood the script with v0.5.2

🤖 Generated with Claude Code

Adds scripts/release.mjs and `npm run release` to handle the full
tag-and-publish flow in one shot. Closes the gap from 0.5.0/0.5.1
where tags got pushed but GitHub Releases didn't, leaving the project
releases page stuck at 0.3.9.

Script validates: clean main + sync, no existing tag clobber, CHANGELOG
entry exists for the version, build (drift guard), tests, gh auth.
Then tags, pushes, creates the GitHub Release with --latest and
CHANGELOG body.

CONTRIBUTING.md documents the procedure including the five duplicated
version literals (with plugin.json explicitly called out as the one
that bit us in 0.4.x).

Backfilled v0.4.0..v0.5.1 GitHub Releases out-of-band.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@wenqingyu wenqingyu merged commit 16f0a57 into main Apr 29, 2026
2 checks passed
@wenqingyu wenqingyu deleted the chore/release-script branch April 29, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants