Major Release Steps
1. Pre-Release Preparation
- Create a milestone by the name of the release [example: Milestone 6.0.0].
- If an issue for changes to recommended rule configs doesn't yet exist, create one [example: Changes to the
recommendedsets for 5.0.0]. - Add any breaking changes intended for the release to that milestone.
- Create two new branches off
mainin the project repository (not a personal fork):v${major}v${major}-canary-auto-release
- Raise a PR from
v${major}-canary-auto-releasetomainmodifying theci.ymlworkflow [example: chore: add auto-canary release for v6]:- Under
pushes:at the beginning of the file, add an- v${major}list item. - Add a
publish_canary_version_v${major}step the same aspublish_canary_versionexcept:- Add the condition:
if: github.ref == 'refs/heads/v${major}'. - Its publish command should be
npx lerna publish premajor --loglevel=verbose --canary --exact --force-publish --yes --dist-tag rc-v${major}.
- Add the condition:
- Merge this into
mainonce reviewed and rebase thev${major}branch.
- Under
2. Merging Breaking Changes
- Send a PR from
v${major}tomain[example: v6.0.0]. - Change all breaking change PRs to target the
v${major}branch.- To signify these changes as breaking, the first line of the PR description must read as
BREAKING CHANGE:, and second line should briefly summarize the changes. - It is important to note that when merged the commit message must also include
BREAKING CHANGE:as the first line in order for lerna to recognize it as a breaking change in the release notes. If you miss this it just means more manual work when writing the release documentation.
- To signify these changes as breaking, the first line of the PR description must read as
- Wait until all required PRs have been merged
- Let the release wait for at least 1 week to allow time for early adopters to help test it and discuss the changes.
- Promote it on the
@tseslinttwitter to get some additional attention.
- Promote it on the
- Once discussions have settled, rebase merge the PR on top of
main.
note
Non-breaking changes can be merged to main or the major branch.
They don't need any special treatment.
3. Releasing the Version
- Discuss with the maintainers to be ready for an out-of-band release. Doing this manually helps ensure someone is on-hand to action any issues that might arise from the major release.
- Prepare the release notes. Lerna will automatically generate the release notes on GitHub, however this will be disorganized and unhelpful for users. We need to reorganize the release notes so that breaking changes are placed at the top to make them most visible. If any migrations are required, we must list the steps to make it easy for users.
- Finally, tweet the release on the
@tseslinttwitter with a link to the GitHub release. Make sure you include additional information about the highlights of the release!