Releases are handled by a mostly automated process consisting of:
- Typescript scripts in
scripts/changes/ - The release.yml Github workflow
When you are ready to begin the release process:
- Merge all release-bound changes to
mainwith their change files - The
release.ymlworkflow will see themainbranch with change files in it:- This triggers the "PR" step and runs
scripts/changes/pr.ts - This will create or update a versioned release branch from
mainsuch asrelease-v7-pr - Runs
scripts/changes/version.ts- Updates versions
- Generate changelogs
- Deletes change files
- Opens a PR from
release-v<major>-prtomain
- This triggers the "PR" step and runs
- Once that PR is merged, the
release.ymlworkflow will run again againstmainand see no change files:- This triggers the
needs-publishstep, which checks npm to see if the currentreact-routerversion is already published - If publishing is needed, this triggers the "publish" step and runs
scripts/changes/publish.ts - Publishes all packages to npm
- Tags the commits and pushes tags to the origin
- Creates a github release
- This triggers the
- The
release-v<major>-prbranch can be deleted after the PR is merged
You may need to make changes to a release while the release PR is open - to do so:
- Branch off of
mainand make whatever changes you need - Add changes files as needed
- Push your branch to GitHub and PR it to
main - Once reviewed/approved, merge the PR to
main - This will trigger an update of the release PR created above
Hotfix releases operate like the above but off of a hotfix branch that is created from the proper version tag we are hotfixing.
- Create a
hotfixbranch from git tag for the release we are hotfixinggit checkout -b hotfix {tag}git push origin --set-upstream hotfix
- Branch from hotfix and make changes
- PR those changes to
hotfixwith a change file - Merge into
hotfix - The
release.ymlworkflow will see thehotfixbranch with change files in it:- This triggers the "PR" step (
scripts/changes/pr.ts) - This will create or update a versioned hotfix branch from
hotfixsuch ashotfix-v7-pr - Update the versions in the new branch
- Generate the proper
CHANGELOG.mdentries - Delete the change files
- Open a PR from
hotfix-v<major>-prto thehotfixbranch
- This triggers the "PR" step (
- Once that PR is merged, the
release.ymlworkflow will run again againsthotfixand see no change files:- This triggers the "publish" step (
scripts/changes/publish.ts) - Publishes all packages to npm
- Tags the commits and pushes tags to the origin
- Creates a github release
- This triggers the "publish" step (
- Merge the
hotfixbranch intomainand push to origin - Deletes the
hotfixbranch