Checklist for publishing
Preparation
- Update CHANGELOG.md with changes per Keep a Changelog format.
- Update documentation in
website/docs(and the latest version inwebsite/versioned_docsif not releasing a new major version).
Publish to npm
Publish from GitHub if possible to add provenance statements.
From GitHub
Note: The "Version" and "Publish" workflows are separate so that the "Publish" workflow runs against the commit created by the "Version" workflow. This ensures that the provenance statements point to the commit with the latest version tag and not its parent commit.
-
Manually run the Version workflow, choosing a version bump strategy and setting Run type to Live. It bumps the package versions with Lerna, pushes the tag, and creates a GitHub Release. (Use Dry run to preview without changing anything.)
-
Creating the release automatically triggers the Publish workflow — there is no need to run it by hand. It builds the packages and publishes them to npm, choosing the dist-tag from the release:
- Prereleases (e.g.
8.0.0-next.1) publish under thenexttag. - Stable releases marked "latest" publish under the
latesttag. - Stable releases not marked "latest" are skipped.
The Publish workflow can still be run manually if you need to re-publish or push a specific dist-tag.
- Prereleases (e.g.
Manual
- Run
npx lerna version [major|minor|patch|prerelease](this automatically runs theversionscript in./package.jsonbefore committing and tagging). - Run
npx lerna publish from-git(add--dist-tag nextif version wasprereleasein previous step).
Wrap up
- Publish a new release on GitHub. (When publishing from GitHub, the "Version" workflow already does this automatically.)