feat(release) automate releases with release-it#21
Merged
Conversation
Replace the manual release process (hand-edit changelog, bump version, tag, push, dispatch ncc-release workflow) with release-it. On merge to main, release.yml runs release-it --ci which bumps package.json, updates doc/CHANGELOG.md, tags with bare semver, and publishes to npm with OIDC provenance. The tag push triggers ncc-release.yaml (now tag-triggered instead of workflow_dispatch) to build platform binaries and create the GitHub Release. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Release workflow uses workflow_dispatch with an increment input (patch/minor/major) instead of auto-triggering on push to main. The pnpm release script dispatches the workflow remotely via gh CLI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6a972cc to
5b30765
Compare
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.
What
Adds
release-itwith the@release-it/keep-a-changelogplugin to automate npm publishing, git tagging, and changelog management. A newrelease.ymlworkflow runsrelease-it --ci --increment <patch|minor|major>viaworkflow_dispatch. Thepnpm releasescript dispatches this workflow remotely viaghCLI (e.g.pnpm release -- minor). The existingncc-release.yamlbinary workflow switches fromworkflow_dispatchto a tag-push trigger ([0-9]+.[0-9]+.[0-9]+) so it fires automatically after release-it creates the tag.Why
The previous release process required five manual steps: editing
doc/CHANGELOG.md, bumpingpackage.json, creating a bare semver tag, runningpnpm publish, and dispatching the ncc-release workflow. Each step was a potential mistake — wrong version, forgotten tag push, stale changelog links. Changesets was evaluated first but has no config for tag format or changelog path, requiring symlinks and--no-git-tagworkarounds. release-it supports bare semver tags (tagName: "${version}"), custom changelog paths (filename: "doc/CHANGELOG.md"), and Keep a Changelog format as first-class config with zero workarounds.Risk Assessment
Low risk. Additive CI workflow and config files. The ncc-release trigger change is the only modification to existing behavior — it replaces a manual dispatch with an equivalent tag-push trigger using the same tag format already in use.