chore: adopt changesets for release management#181
Open
Saturate wants to merge 9 commits into
Open
Conversation
Adds @changesets/cli and @changesets/changelog-github with a release workflow that opens a "Version Packages" PR on main and publishes to npm when merged. Updated CONTRIBUTING.md and AGENTS.md with changeset instructions.
Subsumes the changes from jumbocontext#180 so this PR is self-contained.
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.
Enhanced release management via changesets. No manual release steps needed; it's all handled through the PR flow.
Changesets in a nutshell
Each PR that changes user-facing behavior includes a small markdown file in
.changeset/:The frontmatter declares the package and bump type (
patch/minor/major). The body becomes a line in the release notes. These files accumulate onmainas PRs merge.When it's time to release, the
release.ymlworkflow collects all pending changesets, combines them into a single CHANGELOG entry, bumps the version inpackage.jsonaccordingly (the highest bump type wins), and opens a release PR. Merging that PR publishes to npm.Release flow
flowchart TD A[PR with changeset merges to main] --> B{Pending changesets?} B -- Yes --> C[Opens 'ci: Version Packages & Release' PR<br/>with combined changelog + version bump] C --> D[Josh reviews & merges when ready] D --> E[Merges to main] E --> F{Unpublished version?} F -- Yes --> G[Build + test + publish to npm] G --> H[Creates git tag + GitHub Release] F -- No --> I[Nothing happens] B -- No --> IMultiple PRs can merge before a release. Their changesets stack up and get combined into one version bump. For example, three
patchchangesets become one patch release; aminor+ twopatchbecomes a minor release.CI gate
pr-gate.ymlrunschangeset statuson every PR. Every PR needs a changeset file. For non-user-facing PRs (docs, CI), an empty changeset satisfies the check:What changed in this PR
@changesets/cliand@changesets/changelog-githubas dev dependencies.changeset/config.jsonrelease.ymlworkflowchangesetstatus check topr-gate.ymlpublish.yml(replaced byrelease.yml)CONTRIBUTING.mdandAGENTS.mdwith changeset instructionsnpm provenance
publish.ymlusednpm publish --provenancedirectly. With changesets,changeset publishhandles the publish call, so provenance is now configured viapublishConfiginpackage.json:Same result: published packages are signed and linked back to the GitHub Actions run that built them. No npmjs.org configuration needed.