Skip to content

[infra] Add instructions for patch release #46382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 46 additions & 6 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand All @@ -36,19 +38,57 @@ 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 <my-token>` 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
Copy link
Contributor

@brijeshb42 brijeshb42 Jun 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the version and changelog synced back to master? Mainly for the latest one (v7).
For example, if master is on 7.1.1 and in our normal release, we want to do 7.2.0. But we had to release 7.1.2 for some critical fix.
So next time we do 7.2.0 from master, the changelog will jump directly from 7.1.1 to 7.2.0 if we follow the usual release process.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, the "release" branch changes will need to be merged in master. I also need to check how does the changelog script works.


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.

#### Announce

After the docs is live, follow the instructions in https://mui-org.notion.site/Releases-7490ef9581b4447ebdbf86b13164272d.

Expand Down