Skip to content

chore: add mise run release task for cutting releases#2

Open
alexo-bunnyshell wants to merge 1 commit into
mainfrom
chore/release-task
Open

chore: add mise run release task for cutting releases#2
alexo-bunnyshell wants to merge 1 commit into
mainfrom
chore/release-task

Conversation

@alexo-bunnyshell
Copy link
Copy Markdown
Contributor

Summary

Adds a reusable release helper so cutting a release is a single, validated command instead of a hand-typed gh release create.

mise run release              # cut cli-v<version> from package.json
mise run release -- --dry-run # preview: shows the tag + extracted notes, creates nothing

What it does

scripts/release.sh:

  1. Derives the version from package.json → tag cli-v<version>
  2. Validates preconditions and aborts with a clear message otherwise:
    • on main, working tree clean, in sync with origin/main
    • src/version.ts matches package.json
    • a ## [<version>] section exists in CHANGELOG.md
    • the tag doesn't already exist (local or remote)
  3. Extracts the release notes from that CHANGELOG section (header stripped)
  4. Creates the cli-v<version> GitHub release, which triggers publish.yml (binaries + npm)

It deliberately does not bump the version — that stays in the feature PR (package.json / version.ts / CHANGELOG), matching how 0.3.0 was done.

Notes

  • Wired as a mise task ([tasks.release] in mise.toml), consistent with the bun pin added in 0.3.0.
  • --dry-run verified locally; the precondition checks correctly block a dirty tree / out-of-sync main.

🤖 Generated with Claude Code

scripts/release.sh derives the version from package.json, validates
preconditions (on main, clean tree, in sync with origin, version.ts and
CHANGELOG match, tag free), extracts release notes from the matching
CHANGELOG section, and creates the cli-v<version> GitHub release that
triggers the publish workflow. Supports --dry-run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant