A typical release goes like this:
- You must be a member of the
@base-ui-componentsorg in npm to publish the release. - Set up your npm authToken by logging into npm (
npm login) . This will save a token to~/.npmrcas a line that looks like this://registry.npmjs.org/:_authToken=npm_000000000000000000000000000000000000 - Generate a GitHub Token at https://github.com/settings/personal-access-tokens/new and add it to your shell rc script (either
.bashrcor.zshrc) asGITHUB_TOKEN.- When creating the token, choose mui as the Resource owner.
- Set expiration to 366 days or less.
- Set Public Repositories (read-only) in Repository access.
- Organization permissions are not required.
- Update the root
/package.json's version. - Generate the changelog with
pnpm release:changelogThe output must be prepended to the top levelCHANGELOG.md. Runpnpm release:changelog --helpfor more information. If your GitHub token is not in your env, pass it as--githubToken <my-token>to the above command. - Update the changelog as necessary. In particular, describe all the breaking changes.
- Generate the changelog in a format suitable for the docs with
pnpm release:changelog --format docsand copy it todocs/src/app/(public)/(content)/react/overview/releases/page.mdx. - Copy the changes made in point 3 to the new changelog.
- Run
pnpm release:version. Keep the package versions of stable public packages the same as the rootpackage.jsonversion. - Open a PR with changes and wait for review and green CI.
- Merge the PR once the CI is green and it has been approved.
-
Go to the publish action.
-
Choose "Run workflow" dropdown
- Branch: master
- Commit SHA to release from: the commit that contains the merged release on master. This commit is linked to the GitHub release.
- Run in dry-run mode: Used for debugging.
- Create GitHub release: Keep selected if you want a GitHub release to be automatically created from the changelog.
- npm dist tag to publish to Use to publish legacy or canary versions.
-
Click "Run workflow"
-
Refresh the page to see the newly created workflow, and click it.
-
The next screen shows "@username requested your review to deploy to npm-publish", click "Review deployments" and authorize your workflow run. Never approve workflow runs you didn't initiaite.
The documentation must be updated on the docs-vX branch (docs-v1 for v1.X releases, docs-v2 for v2.X releases, etc.)
Push the working branch to the documentation release branch to deploy the documentation with the latest changes:
pnpm docs:deployYou can follow the deployment process on the Netlify Dashboard
Once deployed, it will be accessible at https://base-ui.netlify.app/ for the docs-v1 deployment.
After the documentation deployment is done, review, and then publish the release that was created in draft mode during the release step GitHub releases page Make sure to check the Set as a pre-release checkbox if publishing an unstable version.