Package Release
Primary Goal
Prepare a release the maintainer only has to publish: a version that matches what changed, a passing pnpm check, and notes that tell consumers what to do.
Workflow
- Read the commits since the last tag and pick the bump by SemVer; before 1.0 a breaking change is a minor.
- Bump with
pnpm version <patch|minor|major> --no-git-tag-versionand commitchore: release v<version>on a branch; open a pull request. - Check the Unreleased section of
CHANGELOG.mdagainst the changes;update-changelogmoves the release notes in after publishing. - Run
pnpm checkandpnpm pack --dry-runto see exactly what will be published. - Stop there. The maintainer merges, drafts the GitHub release
v<version>and publishes it;release-tarball.ymlattaches the packed tarball, andpublish.ymlchecks the tag againstpackage.jsonand publishes to npm. A pre-release only gets the tarball:publish.ymlandupdate-changelog.ymlrun onreleased, which pre-releases do not trigger.
References
.github/workflows/publish.yml,.github/workflows/release-tarball.yml,.github/workflows/update-changelog.yml,.github/release.yml
Anti-Patterns
- Running
pnpm publish, creating tags or GitHub releases without the maintainer asking. - Adding an npm token to the repository instead of trusted publishing.
- Releasing a change to the client before the API it depends on is released.