ci: automate releases with release-it + GitHub Action#44
Merged
Conversation
Replaces manual bump:* / publish:* scripts with release-it orchestration: version bump, CHANGELOG generation, git tag, and GitHub Release in one command. The npm publish itself runs in a new GitHub Action triggered by the release-published event, keeping NPM_TOKEN out of developer machines and ensuring every release is typechecked, built, and tested before publishing.
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
Replaces the fully manual release flow (
yarn bump:*+ localyarn publish:*) with an automated setup modeled on thegjsifymonorepo:release-itorchestrates version bump, CHANGELOG generation (conventional commits), git tagv${version}, commitchore: release v${version}, and GitHub Release — all from oneyarn release[:patch|:minor|:major]command.@release-it/bumpersyncs the new version across every workspacepackage.json(packages/*,infra/*,vendor/*,backend/*,demos/*,examples/*/*)..github/workflows/release.ymltriggers onrelease: published, runscheck:all+build:libs+test, then publishes all non-private workspaces viayarn workspaces foreach ... npm publish --tag latest. NPM_TOKEN stays a repo secret — no more publishing from developer laptops.mainand a clean working tree (guardrails)..yarnrc.ymlgains a packageExtension for@conventional-changelog/git-clientto resolve a PnP peer-dependency chain issue.Replaces
bump:prerelease/bump:patch|minor|major,publish:next/publish:latest→release,release:patch,release:minor,release:major,release:dryRequired before first use
NPM_TOKENas a repository secret (npm Automation Token). Without it the publish step fails.main, then runyarn release:patch(or:minor/:major) frommain.Test plan
yarn installresolves with new release-it devDependenciesyarn release:dry(with guards bypassed for verification only) shows correct version bump, CHANGELOG preview, and git tag planNPM_TOKENrepo secretmain:yarn release:patch→ verify GitHub Release created, Action triggered, packages appear on npm withlatesttag