Skip to content

Instantly share code, notes, and snippets.

@NicholasBoll
Last active November 9, 2022 16:10
Show Gist options
  • Save NicholasBoll/2d3442b16bd424faa91d6c73bc63c1de to your computer and use it in GitHub Desktop.
Save NicholasBoll/2d3442b16bd424faa91d6c73bc63c1de to your computer and use it in GitHub Desktop.
Canvas Kit Major Release

Canvas Kit releases major changes every 6 months. Releases are done by a maintainer. The process is similar to minor releases, except the addition of the support branch. All branches have to be forward merged. Check out all of the following to make sure there are no commits listed:

If there are any commits listed, run the forward merge for the branch that isn't merged forward (support, master, or prerelease/minor). It is safe to run this job even if there are no changes since the job will recognize no change and bail.

We'll be using the terms previous major, current major, and next major in the context of versions before the release process is complete. For example, if support is pointing to v4, master to v5 and prerelease/major to v6, we need to update these pointers. After these steps are completed, the following will happen:

  • support: v4 -> v5
  • master: v5 -> v6
  • prerelease/minor: v5 -> v6
  • prerelease/major: v6 -> v7

Before starting the next steps, make sure to fetch upstream.

git fetch upstream
  1. Update support to point to the current major version master is currently pointing to.
git checkout support
git pull upstream master
git push upstream master:support

This will trigger a support release job that should skip publishing. We do not need to wait for this job. 2. Update master to point to the next major release prerelease/major is currently pointing to. This step produces the actual release, including a Slack message.

git checkout prerelease/major
git pull upstream prerelease/major
git push upstream prerelease/major:master

This will trigger the release. Up to this point, prerelease/major has been creating canary jobs. This will trigger the actual release. We must wait for this job to finish. The job can be found https://github.com/Workday/canvas-kit/actions/workflows/release.yml. The job will be running against master. The CI job will run lerna bump and push that commit back onto the master branch which will include the update to lerna.json that we need in the next step. 3. Once the previous step is completed, we need to update prerelease/minor to point to the next major release. After this step, any PRs against this branch will be correct.

git checkout master
git pull upstream master
git push upstream master:prerelease/minor
  1. Now we need to update prerelease/major with the changes we made to prerelease/minor which include the major release version bump. This will point the canary build to the next next major version. For example, if prerelease/major was pointing to v6 before our release, it will now point to v7.
git checkout master
git pull upstream master
git push upstream master:prerelease/major
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment