When changing any of the packages of the repository,
you'll have to run pnpm changeset add,
and changesets will guide you through the process of adding your changes to be included in the next version's changelog.
Note that if you skip this step when you open a PR,
CI will give a warning.
The steps are:
- Locate the opened PR named Version Packages - 3.x. This PR is automatically created with the first merge in a stable branch after a previous release is published. Changesets will automatically detect changes with each merge and update automatically the PR and consequently the
package.jsons and the dependencies between them - Verify that the correct version is updated in every
package.json, paying special attention that there is no major or minor bump. Approve and merge the Version Packages PR when all checks have passed - Wait until the commit for Version Packages becomes green in the Shipit stack for your branch and push the Deploy button.
- Push again on the Create deploy button to start the deployment. This will publish the CLI packages to the NPM registry. If there are failures (as it can be flaky), rerun the deployment and the missing packages should be published.
- Create a new tag with the new version:
git tag 3.x.x && git push --tags - Create a new release in the CLI repo:
- Use the created tag ("3.x.x")
- Release title: "3.x.x"
- Description: summary of the most important changes from Version Packages PR
- Click "Publish release"
- Only if releasing a patch to the latest stable version: Once the deployment completes, find the PR in the homebrew-shopify repository and merge the changes in the formula.
This should be done once a week.
- Find the Version Packages - main (pre) PR and merge it.
- Wait until the commit for Version Packages - main (pre) becomes green in CLI Production Shipit and push the Deploy button.
- Push again on the Create deploy button to start the deployment. This will publish the CLI packages to the NPM registry. If there are failures (as it can be flaky), rerun the deployment and the missing packages should be published.
First, exit prerelease mode:
- Pull the latest
main, check out a branch, and runpnpm changeset pre exit. - Open a PR to
main, get approval. - Announce in
#shopify-cliand#cli-foundations-teamthat merges should be paused for release. - Merge!
Next, cut the release:
- Locate the opened PR named Version Packages - main. This PR is automatically created with the first merge in
mainafter a previous release is published. Changesets will automatically detect changes with each merge to main and update automatically the PR and consequently thepackage.jsons and the dependencies between them - Verify that the correct version is updated in every package.json, paying special attention that there is no major bump. Approve and merge the Version Packages - main PR when all checks have passed.
Now return to prerelease mode:
- Pull the latest
main, check out a branch, and runpnpm changeset pre enter pre. Commit. - Move the contents from
release_notes_draft.mdto a new file,RELEASE_NOTES/3.x.md, replacing3.xwith the actual minor version number. Be sure to leave the comments where they are! Commit. - Open a PR to
main, get approval. - Merge!
- Announce in
#shopify-cliand#cli-foundations-teamthat the release has been cut, and merges are permitted.
You've designated a commit as releasable. Now time to publish via Shipit:
- Wait until the commit for Version Packages - main becomes green in CLI Production Shipit and push the Deploy button.
- Push again on the Create deploy button to start the deployment. This will publish the CLI packages to the NPM registry. If there are failures (as it can be flaky), rerun the deployment and the missing packages should be published.
- Once the deployment completes, find the auto-generated PR in the homebrew-shopify repository and merge the changes in the formula.
- Create a new tag with the new version:
git tag 3.x.x && git push --tags - Create a new release in the CLI repo:
- Use the created tag ("3.x.x")
- Release title: "3.x.x"
- Description: summary of the most important changes from Version Packages PR
- Click "Publish release"
- Go through all the PRs labeled with
includes-post-release-stepsand: - Follow the post-release steps described in those PRs.
- Delete the labels afterward.
Finally, it's time to do a bit of manual shuffling, as we welcome a stable version and deprecate another:
- Pull the latest
mainand check out the release commit. - From there, check out a branch called
stable/3.x(replacing x with the minor version). - In the repo root, run
cp shipit.stable.yml.sample shipit.stable_3_x.yml; git add shipit.stable_3_x.yml; git commit -m "Add stable/3.x shipit configuration"(replacing x with the minor version each time) - Push your branch.
- Create a shipit stack, setting branch to
stable/3.xand environment tostable_3_x(replacing x with the minor version each time). The names are VERY IMPORTANT to get right, as they will enable Shipit to find your branch and detect deployable commits! - Checkout the previous minor release's
stable/3.xbranch. - Open that branch's
shipit.stable_3_x.ymlfile and follow the directions in thedeploy.overridecomments. This will do 2 things:- Ensure Homebrew always points to the latest stable version
- Ensure npm's
@latesttag always points to the latest stable version
- Commit and push your changes.
- If we have decided to label a minor version as end-of-life, find the appropriate stack in CLI Shipit and archive it.