Below you will find instructions for release processes for projects within our monorepo. The main goal of our process is to neatly document any changes that may happen during QA, such as bug fixes, and separate production concerns from our development branch.
Our release process is still a work-in-progress. The app and API projects are currently versioned together to ensure interoperability.
- Ensure you have a buildroot release created in GitHub with all the changes you want in this release, if any. If there are no buildroot changes, you don't have to create a new release; the last tag in buildroot is used for release builds.
- Checkout
edge
and make a release branch, without any new changes. The branch name should matchrelease_*
to makemake bump
usage easier and make it clear this is a release.
git checkout edge
git pull
git checkout -b release_${version}
git push --set-upstream origin release_${version}
- Open a PR into
release
for your empty release branch. - Create a new branch for your initial version bump:
git checkout -b chore_bump-${version}
- In the bump branch, bump the version to the appropriate alpha (read the section below carefully)
- Inspect version bumps and changelogs
- Edit the user-facing changelog at
app-shell/build/release-notes.md
to add the new notes for the app - Edit the user-facing changelog at
api/release-notes.md
to add the new notes for the robot software git add --all
git cz
- Type:
chore
- Scope:
release
- Message:
${version}
- Gather reviews on changelogs and release notes until everybody is satisfied. Check the docs at sandbox.docs.opentrons.com/release_${version}
- Once your chore bump branch is ready, squash merge the
chore_bump-${version}
into therelease_${version}
branch. - Tag the release branch as the version you just bumped to; this is a release candidate that will undergo QA:
git tag -a v${version} -m 'chore(release): ${version}'
git push origin v${version}
-
Run QA on this release. If issues are found, create PRs targeted on the release branch. To create new alpha releases, repeat steps 4-13.
-
Once QA is a pass, bump to the target release version (review the section below again)
-
Fix up the autogenerated changelogs to remove the references to alpha versions and make sure the release version has all changes since the latest release
- Make sure the comparison link is to the latest release verison (e.g.:
compare/v3.11.4...v3.12.0)
instead ofcompare/v3.12.0-alpha.1...v3.12.0)
) - Delete the sub-sections that relate only to alpha releases, so that the changelog is against the latest actual release
- Make sure the comparison link is to the latest release verison (e.g.:
-
Do a NORMAL MERGE into
release
. Do NOT squash or rebase. This should be done from your local command line (and will succeed as long as the release PR is reviewed and status checks have passed):
# note: make sure you have pulled the latest changes for branch
# release_${version} locally before merging into release
git checkout release
git merge --ff-only release_${version}
git push origin release
- Tag the release:
git tag -a v${version} -m 'chore(release): ${version}'
git push origin v${version}
- Open a PR of
release
intoedge
. Give the PR a name likechore(release): Merge changes from ${version} into edge
. Once it passes, on the command line merge it intoedge
:
git checkout edge
git pull
git merge --no-ff release
- Use the PR title for the merge commit title. You can then
git push origin edge
, which will succeed as long as the PR is approved and status checks pass. - Release the docs for this version (see below under Releasing Web Projects)
- Ensure you have a buildroot release created in GitHub with all the changes you want to see, if any. If there aren't any, you don't have to create a new buildroot release; by default, the last tag is used for release builds.
- Checkout
release
and make a release branch, without any new changes. The branch name should matchhotfix_*
to make it clear this is a hotfix, and makemake bump
usage simpler.
git checkout release
git pull
git checkout -b hotfix_${version}
git push --set-upstream origin hotfix_${version}
- Target the hotfix PRs on this branch.
- Once the fixes have been merged into the original hotfix branch, create a new branch for your initial version bump:
git checkout -b chore_bump-${version}
- In the bump branch, bump the version to the appropriate alpha (read the section below carefully)
- Inspect version bumps and changelogs
- Edit the user-facing changelog at
app-shell/build/release-notes.md
to add the new notes for the app - Edit the user-facing changelog at
api/release-notes.md
to add the new notes for the robot software git add --all
git cz
- Type:
chore
- Scope:
release
- Message:
${version}
- Push this commit
- Once your chore bump branch is ready, squash merge the
chore_bump-${version}
into thehotfix_${version}
branch. - Tag the release branch as the version you just bumped to; this is a release candidate that will undergo QA:
git tag -a v${version} -m 'chore(release): ${version}'
git push origin v${version}
- Run QA on this release. If issues are found, create PRs targeted on the release branch. To create new alpha releases, repeat steps 4-11.
- Once QA is a pass, bump to your target version (review the section below again)
- Fix up the autogenerated changelogs to remove the references to alpha versions and make sure the release version has all changes since the last release
- Make sure the comparison link is to the latest release verison (e.g.:
compare/v3.11.4...v3.12.0)
instead ofcompare/v3.12.0-alpha.1...v3.12.0)
) - Delete the sub-sections that relate only to alpha releases, so that the changelog is against the latest actual release
- Do a NORMAL MERGE into
release
. Do NOT squash or rebase. This should be done from your local command line (and will succeed as long as the release PR is reviewed and status checks have passed):
# note: make sure you have pulled the latest changes for branch
# release_${version} locally before merging into release
git checkout release
git merge --ff-only release_${version}
git push origin release
- Tag the release:
git tag -a v${version} -m 'chore(release): ${version}'
git push origin v${version}
- Open a PR of
release
intoedge
. Give the PR a name likechore(release): Merge changes from ${version} into edge
. Once it passes, on the command line merge it intoedge
:
git checkout edge
git pull
git merge --no-ff release
- Use the PR title for the merge commit title. You can then
git push origin edge
, which will succeed as long as the PR is approved and status checks pass. - Release the docs for this version (see below under Releasing Web Projects)
make bump
runs lerna version
(with git tag and push disabled) to bump all required files. You can pass options to lerna with the version
environment variable. See the [lerna version docs][lerna-version] for available options. The most important options are:
- First positional argument: bump type or explicit version
- Default:
prerelease
- Valid bumps:
major
,minor
,patch
,premajor
,preminor
,prepatch
,prerelease
. Alpha versions should be created withpremajor
,preminor
,prepatch
, orprerelease
. Releases should bemajor
,minor
, orpatch
. - See [semver.inc][semver-inc] for keyword meanings
- Default:
--preid
- Used to specify the pre-release identifier- Default:
alpha
- Valid:
alpha
,beta
- Default:
--allow-branch
- Specifically allow a branch to be bumped- By default, Lerna will only accept a bump on a branch named
release_*
orhotfix_*
- By default, Lerna will only accept a bump on a branch named
# by default, bump to next alpha prerelease:
# e.g. 3.0.0 -> 3.0.1-alpha.0
# e.g. 3.0.1-alpha.0 -> 3.0.1-alpha.1
make bump
# equivalent to above
make bump version="prerelease"
# bump to a beta version, the standard practice for a new release
make bump version="prerelease --preid=beta"
# prerelease minor version bump (e.g. 3.0.0 -> 3.1.0-alpha.0)
make bump version="preminor"
# minor version bump (e.g. 3.0.0-alpha.0 -> 3.1.0)
make bump version="minor"
# bump to an explicit version
make bump version="42.0.0"
# bump a patch version, e.g. for a hotfix
make bump version="patch --allow-branch hotfix_*"
We use [lerna][], a monorepo management tool, to work with our various projects. You can use lerna to do things like see which projects have changed since the last release, or run a command in every project directory. To run a one-off lerna command, use:
# use yarn run to run devDependency CLI tools like lerna
yarn run lerna [opts]
The following web projects are versioned and released independently from the app and API:
protocol-designer
- designer.opentrons.com
labware-library
- labware.opentrons.com
- API documentation
- docs.opentrons.com
See scripts/deploy/README.md for the release process of these projects.