If this is a scheduled release most of the development is on a release candidate branch (ie. rc0.7.x, rc0.8.0). You will need to create a PR merging it into master. Have someone quickly review it -- all issues should have been addressed during the regular PR process for each commit into the RC branch.
The CLA may not pass since some contributors may be from outside the org. This is ok so long as the previous PRs were signed.
Once merged into master, continue the process below.
Employees are supposed to do this as part of onboarding, but we've put it here as a reminder.
npm login
This will log you into NPM.
Ping the Slack announcements channel first! This will let other members of the team know NOT to merge PRs during this release process.
Ensure you are on the master branch
git checkout master && git pull --tags
This will pull the latest of master onto your git clone.
. ./scripts/release/pre-release.sh
This will ensure you can publish/tag, build all release files, and ensure all tests pass prior to releasing (lerna will update versions for us in the next step).
$(npm bin)/lerna publish --skip-git
When lerna prompts for version, go with the next minor release (or patch if its a bug fix release).
This command will update the package-lock.json
file(maybe), package.json
files of the updated packages, and lerna.json
.
To update the CHANGELOG.md file, you will need to install (conventional-changelog-cli)[https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-cli].
npm install -g conventional-changelog-cli
Once installed run:
conventional-changelog -p angular -i CHANGELOG.md -s -r 1
The CHANGELOG.md
will also be updated with the new version's changes. You will need to edit the header of the file at the very least. If you need to edit any other parts of the CHANGELOG.md
, now is the time.
git add packages/ package-lock.json lerna.json CHANGELOG.md .travis.yml
git commit -m "chore: Publish"
. ./scripts/release/post-release.sh
This script will create the new version's Git tag.
git push && git push --tags
This will ensure the commits and tags are pushed to the remote git repository.
If you run into CLI errors such as:
remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: Required status check "cla/google" is expected. At least one approved review is required by reviewers with write access.
To github.com:material-components/material-components-web-react.git
! [remote rejected] master -> master (protected branch hook declined)
You may need to update Github's master branch protection:
- Go to: settings page
- Uncheck Include administrators
- Click Save changes
- Perform git push && git push --tags
- Don't forget to toggle on Include administrators & click Save changes
These steps can be done anytime after the release. But should be taken care of before any new development is started.
If it hasn't already been done, you will need to create a new RC branch. If the next release is v0.8.0, create a branch named rc0.8.0
and push this to the Github repository for everyone to branch from. Once complete follow the remaining checklist items:
- Add a new protection rule to the RC Branch.
- branch name should match new RC branch name.
- check the following: