Skip to content

feat: switch to changesets release PR workflow#951

Draft
kdaviduik wants to merge 1 commit intoenable-auto-changelogfrom
03-13-chore_delete_deploying.md
Draft

feat: switch to changesets release PR workflow#951
kdaviduik wants to merge 1 commit intoenable-auto-changelogfrom
03-13-chore_delete_deploying.md

Conversation

@kdaviduik
Copy link
Copy Markdown
Contributor

@kdaviduik kdaviduik commented Mar 14, 2026

Part of https://github.com/Shopify/developer-tools-team/issues/1195


Summary

  • Delete DEPLOYING.md (content moved to CONTRIBUTING.md, and then CONTRIBUTING.md itself was updated)
    • Most of the previous information in DEPLOYING.md is no longer accurate now that there's a changeset release PR rather than a release happening upon merging into main
  • Create CLAUDE.md and AGENTS.md as symlinks to CONTRIBUTING.md so that we have a single source of truth for all of this information
  • Rewrite npm-release.yml for the changesets release PR pattern: pending changesets create a [ci] release PR; merging that PR triggers npm publish

Why

The previous workflow published to npm immediately on PR merge. This made it extremely un-ergonomic to batch multiple changes in a single release, and required workarounds (like adding [DOCS] to the PR title) to avoid releasing a new Buy Button JS version when there were zero code changes. The release PR pattern (used by Hydrogen and many Shopify repos) creates an intermediate PR showing exactly what will be published and is the more modern, preferred way of managing releases.

External prerequisite

SHOPIFY_GH_ACCESS_TOKEN must be provisioned via github-actions-access-provider#2613. The release PR creation works without it (using GITHUB_TOKEN), but merging the release PR won't auto-trigger publish until this token is provisioned.

  • We won't be doing a release until a LOT more PRs are merged. I am looking into this but there's no massive rush (ie: this PR can merge before that's done)


If your PR doesn't need a new npm release (docs-only changes, test updates, CI changes, etc.), just don't include a changeset. No changeset = no release PR = no npm publish.

### Rollback (update `latest` CDN version)
Copy link
Copy Markdown
Contributor Author

@kdaviduik kdaviduik Mar 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's extremely rare that we'd need/want to do this, but this was in the old DEPLOYING.md and is helpful to have just in case, especially the info like how to purge the CDN cache

@@ -1,29 +1,31 @@
name: Release new NPM version
name: Release
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is very similar to Hydrogen's release.yml workflow

Replace the direct-publish npm release workflow with the two-mode
changesets/action pattern: pending changesets create a release PR
titled "[ci] release"; merging it triggers npm publish.

Why: the previous workflow published to npm immediately on PR merge
with no human review gate for version bumps or changelogs. The release
PR pattern creates an intermediate PR showing exactly what will be
published before it goes out.

Key changes:
- Rewrite npm-release.yml to use changesets/action v1.7.0
- Switch trigger to push-to-main with queue concurrency
- Use SHOPIFY_GH_ACCESS_TOKEN (GITHUB_TOKEN can't re-trigger workflows)
- Add full git history fetch and registry-url for npm auth
- Enable @changesets/changelog-github for automatic changelog generation
- Add @changesets/changelog-github devDependency
- Set .changeset/config.json access to "public"
- Delete DEPLOYING.md (content moved to CONTRIBUTING.md)
- Add deploy/release/rollback docs to CONTRIBUTING.md
- Update CLAUDE.md and AGENTS.md symlinks to point to CONTRIBUTING.md
- Fix CHANGELOG.md v3.0.6 date from "(Unreleased)" to 2025-08-25
- Remove manual changeset detection and [ROLLBACK]/[DOCS] skip logic

Co-Authored-By: Claude <noreply@anthropic.com>
@kdaviduik kdaviduik force-pushed the 03-13-chore_delete_deploying.md branch from 215a2cc to 5ebe7c7 Compare March 18, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant