This is a list of the things that need to happen during a release.
If you are releasing a beta or a release candidate, no official changelog is needed, but you're not off the hook! You'll need to write testing instructions in lieu of an official changelog.
- Open the associated milestone. All issues and PRs should be closed. If they are not you should reassign all open issues and PRs to future milestones.
- Go through the commit history since the last release. Ensure that all PRs
that have landed are marked with the milestone. You can use this to
show all the PRs that are merged on or after YYYY-MM-DD:
https://github.com/issues?utf8=%E2%9C%93&q=repo%3Aapollographql%2Frouter+merged%3A%3E%3DYYYY-MM-DD
- Go through the closed PRs in the milestone. Each should have a changelog label indicating if the change is documentation, feature, fix, or maintenance. If there is a missing label, please add one. If it is a breaking change, also add a BREAKING label.
- Set the release date in
NEXT_CHANGELOG.md
. Add this release to theCHANGELOG.md
. Use the structure of previous entries. - Update
docker.mdx
andkubernetes.mdx
with the release version. - Update
helm/chart/router/Chart.yaml
and inhelm/chart/router/README.md
as follows:- increment the version. e.g.
version: 0.1.2
becomesversion: 0.1.3
- update the appVersion to the release version. e.g.:
appVersion: "v0.9.0"
- increment the version. e.g.
- Update
federation-version-support.mdx
with the latest version info. Use https://github.com/apollographql/version_matrix to generate the version matrix. - Update the version in docker-compose files in
dockerfiles
directory.
- Make sure you have
cargo
installed on your machine and in yourPATH
. - Create a new branch "#.#.#" where "#.#.#" is this release's version (release) or "#.#.#-rc.#" (release candidate)
- Update the version in
*/Cargo.toml
(do not forget the ones in scaffold templates). - Add a new section in
CHANGELOG.md
with the contents ofNEXT_CHANGELOG.md
- Put a Release date and the version number on the new
CHANGELOG.md
section - Update the version in
NEXT_CHANGELOG.md
. - Clear
NEXT_CHANGELOG.md
leaving only the template. - Run
cargo check
so the lock file gets updated. - Run
cargo xtask check-compliance
. - Push up a commit with the
*/Cargo.toml
,Cargo.lock
,CHANGELOG.md
andNEXT_CHANGELOG.md
changes. The commit message should be "release: v#.#.#" or "release: v#.#.#-rc.#" - Request review from the Router team.
Most review comments will be about the changelog. Once the PR is finalized and approved:
- Always use
Squash and Merge
GitHub button.
This part of the release process is handled by CircleCI, and our binaries are distributed as GitHub Releases. When you push a version tag, it kicks off a workflow that checks out the tag, builds release binaries for multiple platforms, and creates a new GitHub release for that tag.
- Wait for tests to pass.
- Have your PR merged to
main
. - Once merged, run
git checkout main
andgit pull
. - Sync your local tags with the remote tags by running
git tag -d $(git tag) && git fetch --tags
- Tag the commit by running either
git tag -a v#.#.# -m "#.#.#"
(release), orgit tag -a v#.#.#-rc.# -m "#.#.#-rc.#"
(release candidate) - Run
git push --tags
. - Wait for CI to pass.
After CI builds the release binaries, a new release will appear on the
releases page, click
Edit
, update the release notes, and save the changes to the release.
- Paste the current release notes from
NEXT_CHANGELOG.md
into the release body. - Reset the content of
NEXT_CHANGELOG.md
.
-
CI should already mark the release as a
pre-release
. Double check that it's listed as a pre-release on the release'sEdit
page. -
If this is a new rc (rc.0), paste testing instructions into the release notes.
-
If this is a rc.1 or later, the old release candidate testing instructions should be moved to the latest release candidate testing instructions, and replaced with the following message:
This beta release is now out of date. If you previously installed this release, you should reinstall and see what's changed in the latest [release](https://github.com/apollographql/router/releases).
The new release candidate should then include updated testing instructions with a small changelog at the top to get folks who installed the old release candidate up to speed.
Mistakes happen. Most of these release steps are recoverable if you mess up.
Tags and releases can be removed in GitHub. First, remove the remote tag:
git push --delete origin vX.X.X
This will turn the release into a draft
and you can delete it from the edit
page.
Make sure you also delete the local tag:
git tag --delete vX.X.X