diff --git a/scripts/README.md b/scripts/README.md index e1d94ba2d0cefd..be410dcd99a730 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -2,8 +2,6 @@ ## Release -A typical release goes like this: - ### Prerequisites 1. You must be a member of the `@mui` org in npm to publish the release @@ -18,7 +16,11 @@ A typical release goes like this: ``` 4. Generate a GitHub Token at https://github.com/settings/personal-access-tokens/new and add it to your shell rc script (either `.bashrc` or `.zshrc`) as `GITHUB_TOKEN`. -### Prepare +### Releasing a minot version + +A minor release goes like this: + +#### Prepare The following steps must be proposed as a pull request. @@ -36,19 +38,61 @@ The following steps must be proposed as a pull request. 5. Open PR with changes and wait for review and green CI 6. Merge PR once CI is green and it has been approved -### Release +#### Release 1. Checkout the last version of the release branch 2. `pnpm install && pnpm release:build` (make sure you have the latest dependencies installed, and build the packages) 3. `pnpm release:publish` (release the versions on npm, you need your 2FA device) 4. `pnpm release:tag` (push the newly created tag) -### Documentation +#### Documentation `pnpm docs:deploy` to deploy the documentation (it lives at https://material-ui.netlify.app/) with the latest changes. Force push if necessary. -### Announce +#### Announce + +After the docs is live, follow the instructions in https://mui-org.notion.site/Releases-7490ef9581b4447ebdbf86b13164272d. + +### Releasing a patch version + +A patch release goes like this: + +#### Prepare + +Checkout the latest minor release tag and create a branch "release/PATCH_VERSION". Cherry-pick the necessary commit on this branch. The following steps must be proposed as a pull request. + +1. Generate the changelog with `pnpm release:changelog` + The output must be prepended to the top level `CHANGELOG.md` + `pnpm release:changelog --help` for more information. If your GitHub token is not in your env, pass it as `--githubToken ` to the above command. + +2. Clean the generated changelog: + 1. Match the format of https://github.com/mui/material-ui/releases. + 2. Change the packages names casing to be lowercase if applicable +3. Update the root `/package.json`'s version +4. Run `pnpm release:version`. Keep in mind: + 1. Only packages that have changes since the last release should have their version bumped. + 2. If they have changes, packages that follow Material-UI's versioning scheme should be bumped to the same version as the root `package.json`. This might require skipping some version numbers. +5. Open PR with changes and wait for review and green CI +6. Merge PR once CI is green and it has been approved + +#### Release + +1. Checkout the last version of the release branch +2. `pnpm install && pnpm release:build` (make sure you have the latest dependencies installed, and build the packages) +3. `pnpm release:publish` (release the versions on npm, you need your 2FA device) +4. `pnpm release:tag` (push the newly created tag) + +#### Documentation + +Run `git push -f material-ui-docs HEAD:latest` to deploy the documentation (it lives at https://material-ui.netlify.app/) with the latest changes. +Force push if necessary. + +#### Cleanup + +After the release is done, merge the branch back to master. While merging make sure to resolve conflicts considering master may have future changes done in the same files. + +#### Announce After the docs is live, follow the instructions in https://mui-org.notion.site/Releases-7490ef9581b4447ebdbf86b13164272d.