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
PR on themain
ornext
branch. a. If releasing fromnext
, ensure that the branch is up to date with main - Look at the PR and ensure that it looks good. If the version is not correct, you may need to create a new PR that does one of the following:
a. If the version is alpha/beta/rc and you prefer a new major/minor/patch, you'll need to run
npx changeset pre exit
. b. 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>
. c. If the version is a patch release, and you want it to be a minor, you'll need to make sure that you've committed anpx changeset add
that has release notes for a minor release. - Once you've merged this to main, the existing PR should be updated to have the intended version.
- Once everything looks good, approve the PR and merge. This should create a new release and publish the packages to npm and https://github.com/apollographql/federation/releases.
- For now, we may need to do some manual massaging of the npm tags. 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 the harmonizer, and the other for therouter-bridge
. If all tests pass and everything looks good, mergeharmonizer
first, then once the Github action is complete, merge therouter-bridge
.
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.