Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ Before removing or incompatibly changing a stable interface:

## Releases and stable branches

- This repository is published from Shopify's internal monorepo. `main`'s version bump is made upstream with `pnpm changeset-manifests`, and the mirror carries it to GitHub: it opens or refreshes a pull request here automatically after each upstream merge, and merges it once `main`'s required checks pass. GitHub's `release.yml` then publishes as before.
- This repository is published from Shopify's internal monorepo. The mirror carries each upstream merge to GitHub: it opens or refreshes a pull request here automatically, and merges it once `main`'s required checks pass. GitHub `main` publishes only nightlies, never a release: on each push, its release workflow only checks that every version on `main` is on npm.
- Minor and patch releases ship from a `stable/X.Y` branch. Only Dev Experience members can create one: for a minor, a Dev Experience member creates it before the release, at a green `main` commit, with `git push origin <commit>:refs/heads/stable/X.Y`. That line's patches go to the same branch.
- `release.yml` pushes each version bump to `changeset-release/stable/X.Y`. GitHub Actions can't open pull requests here, so the release owner opens "Version Packages - stable/X.Y" from that branch, closes and reopens it to run its checks, and QAs its head commit with `release-qa-package.yml`.
- The release owner checks that `stable/X.Y` hasn't moved since the bump, then merges the pull request pinned to the QA'd commit: `gh pr merge <number> --merge --admin --match-head-commit <commit>`. Use a merge commit (`--merge`): a squash merge publishes nothing. `release.yml` then publishes from `stable/X.Y` only the versions that the merge changed. After the release, the version bump is applied upstream, and the mirror carries it to `main`.
- Never merge "Version Packages - main" on GitHub. It would put commits on GitHub `main` that the mirror didn't make, and the mirror would refuse every later publish.
- `stable/*` patch lines keep their own "Version Packages - stable/X.Y" pull requests on GitHub. GitHub Actions can't open them, so a Dev Experience member opens each one from `changeset-release/stable/X.Y`.
- Each `X.Y.0` release gets a `stable/X.Y` branch for its patch releases. Only Dev Experience members can create one: after the release, a Dev Experience member creates it from the release tag with `git push origin refs/tags/X.Y.0:refs/heads/stable/X.Y`.
- Changes to `stable/*` branches, such as patch-release backports and their "Version Packages" pull requests, go through a pull request that a Dev Experience member merges with the branch rules' bypass, with no review.
- Dev Experience members can push to and create `stable/*` branches without a pull request; force-pushes and deletion stay blocked. Other changes to `stable/*`, such as patch-release backports, go through a pull request that a Dev Experience member merges with the branch rules' bypass, with no review. While a release is open, only its release owner merges into `stable/X.Y`.
8 changes: 4 additions & 4 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ pnpm bundle-for-release
# Create a duplicate package for the CLI (to be deployed as just `shopify`)
node bin/create-cli-duplicate-package.js

# Packages outside the fixed version group publish from main, under `latest`. A prerelease run
# would put their real version under the prerelease tag, and a stable line's run under
# stable-X.Y; npm then has that version, a later `latest` run skips it, and `latest` never points
# to it. They are marked private for this run, and `changeset publish` skips them. `shopify` is
# Packages outside the fixed version group publish only under `latest`, from the newest stable
# line's release. A prerelease run would put their real version under the prerelease tag, and an
# older line's run under stable-X.Y; npm then has that version, a later `latest` run skips it, and
# `latest` never points to it. They are marked private for this run, and `changeset publish` skips them. `shopify` is
# the copy of @shopify/cli that bin/create-cli-duplicate-package.js makes in packages/cli-copy.
if [ "$tag" != "latest" ]; then
node -e '
Expand Down
Loading