Skip to content

Latest commit

 

History

History

scripts

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

MUI Scripts

Release

A typical release goes like this:

Prerequisites

  1. You must be a member of the @mui org in npm to publish the release
  2. Set up your npm authToken by logging into npm (npm login) . This will save a token to ~/.npmrc as a line that looks like this:
    //registry.npmjs.org/:_authToken=npm_000000000000000000000000000000000000
    
  3. Make sure you have added the material-ui-docs remote to deploy the documentation:
    git remote add material-ui-docs https://github.com/mui/material-ui-docs.git
  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

The following steps must be proposed as a pull request.

  1. Generate the changelog with yarn release:changelog The output must be prepended to the top level CHANGELOG.md yarn 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, e.g. change Material to material
  3. Update the root /package.json's version

  4. yarn release:version, keep in mind:

    1. Keep the package versions of stable public packages the same as the root package.json version.
    2. Don't bump private packages unless necessary, these have "private": true in their package.json
    3. Manually remove ^ from packages with prerelease version, e.g. -alpha
    4. [IMPORTANT] Search for the older version string in the whole project directory and bump packages and its references that are still on the old version.
  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 merge commit of the merged PR
  2. yarn
  3. yarn release:build
  4. yarn release:publish You need your 2FA device.
  5. yarn release:tag

Documentation

yarn docs:deploy to deploy the documentation (it lives at https://material-ui.netlify.app/) with the latest changes. Force push if necessary.

Announce

Follow the instructions in https://mui-org.notion.site/Releases-7490ef9581b4447ebdbf86b13164272d.

Deploy documentation without a release

Sometimes it is necessary to deploy the selected commit(s) without deploying all the changes that have been merged into the main branch since the previous release (e.g. publishing a blog post or releasing urgent docs updates).

To do so, follow these steps:

  1. Add the material-ui-docs remote if you haven't done this already:

    git remote add material-ui-docs https://github.com/mui/material-ui-docs.git
  2. Switch to the latest branch from material-ui-docs remote:

    git switch --detach material-ui-docs/latest
  3. Cherry-pick the commit(s) that you want to include in the new deployment:

    git cherry-pick <commit>

    It will commit the changes if there are no conflicts.

    In case of conflicts you will need to resolve them and commit the changes manually.

  4. Push the changes to the material-ui-docs remote:

    git push material-ui-docs HEAD:latest
  5. Switch from detached HEAD back to your last checked out branch:

    git checkout -