Skip to content

Latest commit

 

History

History
95 lines (56 loc) · 5.08 KB

RELEASING.md

File metadata and controls

95 lines (56 loc) · 5.08 KB

Releasing shopify-app-js packages

  • The shopify-app-js repo uses changesets to track and update the respective CHANGELOG.md files within the packages.

  • When creating a PR, the author should run the yarn changeset command, answer the relevant questions (i.e., what packages does this PR update, is it major/minor/patch, what is the change description), and then commit the new file created in the .changeset directory. These files are used by the workflows to construct the CHANGELOG.md entries.

    Note If the change is very small and doesn't warrant a changelog entry, run yarn changeset --empty and commit the resultant file in the .changeset directory.

  • When the PR is merged into the main branch, the main-release.yml workflow uses the changesets/action to either create or update an existing PR that has the title Version Packages. This PR tracks all the changes currently being made against the main branch since the last release.

❗ To perform a release

  1. Checkout the changeset-release/main branch

    git checkout changeset-release/main
  2. If the @shopify/shopify-app-express package is being updated as part of the release (see the Releases section of the main comment in the Version Packages PR)

    1. Update the version string in the packages/shopify-app-express/src/version.ts file to match the version in the packages/shopify-app-express/package.json file.
  3. While the branch is checked out, edit/remove any of the comments in the changed CHANGELOG.md files and commit them to the changeset-release/main branch.

  4. Once the files in the PR reflect the desired release changes, merge the Version Packages PR into main - this triggers the release.

  5. The same changesets/action in the main-release.yml workflow will call yarn release, which builds the packages and pushes the changed packages to npmjs.org.


Release Candidates

For significant changes that could result in significant refactoring on the part of developers, consider releasing a few Release Candidate versions in advance of the final version.

Warning

These changes must be made against the next branch, so that the appropriate workflows can run (next-release.yml).

Warning

Before commencing the effort for a batch of release candidates, make sure the next branch an identical copy of main.

  • Prior to creating the first PR against the next branch, run the yarn changeset pre enter rc command and commit the resultant files from .changeset, including the pre.json file. This informs changesets that it is in pre-release mode, and the pre-release tag is rc.

  • When creating a PR, the author should run the yarn changeset command, answer the relevant questions (i.e., what packages does this PR update, is it major/minor/patch, what is the change description), and then commit the new file created in the .changeset directory. These files are used by the workflows to construct the CHANGELOG.md entries for the release candidates.

    Note If the change is very small and doesn't warrant a changelog entry, run yarn changeset --empty and commit the resultant file in the .changeset directory.

  • When the PR is merged into the next branch, the next-release.yml workflow uses the changesets/action to either create or update an existing PR that has the title Version Packages for Release Candidates.

❗ To perform a release of release candidate packages

  1. Checkout the changeset-release/next branch

    git checkout changeset-release/next
  2. If the @shopify/shopify-app-express package is being updated as part of the release (see the Releases section of the main comment in the Version Packages for Release Candidates (rc) PR)

    1. Update the version string in the packages/shopify-app-express/src/version.ts file to match the version in the packages/shopify-app-express/package.json file.
  3. While the branch is checked out, edit/remove any of the comments in the changed CHANGELOG.md files and commit them to the changeset-release/next branch.

  4. Once the files in the PR reflect the desired release changes, merge the Version Packages for Release Candidates (rc) PR into next - this triggers the release.

  5. The same changesets/action in the next-release.yml workflow will call yarn release, which builds and pushes the release candidates to npmjs.org.

Merging next into main (moving from pre-release to main release)

When a major set of changes is about to be mass released from the next branch

Warning

The next steps need to be confirmed

  1. Checkout the changeset-release/next branch

    git checkout changeset-release/next
  2. Take the next branch out of pre-release mode by running

    yarn changeset pre exit

    And commit the changed files.

  3. Merge the next branch into main. This should update the relevant CHANGELOG.md files on main with the changes from the release candidates.

  4. Follow the release procedure outlined above