This is a quick and opinionated set of commands for building and releasing a new version of the packages in this monorepo.
- Install
gh
https://cli.github.com/ and ensure you're logged in withgh auth status
More details can be found in the changeset
docs for publishing
- Find the
changesets
release PR on themain
(patch releases) ornext
(minor/major releases) branch.- If releasing from
next
, ensure that the branch is up to date with main
- If releasing from
- Look at the PR and ensure that it looks good. If the version is not correct, you may need to create and merge a new PR that does one of the following:
- If the version is
alpha
/beta
/rc
and you prefer a newmajor
/minor
/patch
, you'll need to runnpx changeset pre exit
. - If the version is not
alpha
/beta
/rc
and you want it to be, you'll need to runnpx changeset pre enter <alpha|beta|rc|preview>
. - If the version is a
patch
release, and you want it to be aminor
, you'll need to make sure that you've committed anpx changeset add
that has release notes for a minor release.
- If the version is
- Once everything looks good, approve the PR and merge. This should create a new GH release and publish the packages to NPM.
- Verify whether NPM tags are correct (as occassionally we may need to manually fix them). Run
./scripts/check-npm-packages.sh
and ensure all tags look correct. If (when) they don't, you'll need to manually runnpm dist-tag
to ensure all tags are set to the correct release. - As part of publishing the release, two PRs will be created in
federation-rs
, one for theharmonizer
, and the other for therouter-bridge
.- If all tests pass and everything looks good, merge
harmonizer
PR first. - Once the
harmonizer
release (Github action) is complete, merge therouter-bridge
PR.
- If all tests pass and everything looks good, merge
- When releasing minor/major versions, you will need to create a follow up PR to merge changes from
next
tomain
branch.- In order to preserve the change history between
next
andmain
branches, make sure to usemerge
commit. By default, all PRs should besquashed
so you might need to temporarily re-enablemerge
commits in the repository settings.
- In order to preserve the change history between
Mistakes happen. Most of these release steps are recoverable if you mess up.
except don't make any mistakes yet, because we haven't documented troubleshooting steps.