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
Contributor

@kdaviduik kdaviduik commented Mar 14, 2026

Summary

  • Delete DEPLOYING.md (content moved to CONTRIBUTING.md)
  • Rewrite npm-release.yml for the changesets release PR pattern: pending changesets create a [ci] release PR; merging that PR triggers npm publish
  • Update .changeset/config.json: access: "public", enable @changesets/changelog-github
  • Add deploy/release/rollback documentation to CONTRIBUTING.md
  • Create CLAUDE.md and AGENTS.md as symlinks to CONTRIBUTING.md
  • Add .env to .gitignore
  • Update stale task doc references

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 (used by Hydrogen and many Shopify repos) creates an intermediate PR showing exactly what will be published.

Key changes in npm-release.yml

  • Trigger: push to main (was pull_request: closed)
  • Concurrency: queues runs, no cancel-in-progress (was true — could kill mid-flight publish)
  • fetch-depth: 0 for changelog generation (was 1)
  • changesets/action v1.7.0 handles both version PR creation and publish (was v1.5.2 with manual steps)
  • SHOPIFY_GH_ACCESS_TOKEN instead of GITHUB_TOKEN (GitHub blocks GITHUB_TOKEN events from re-triggering workflows)
  • Removed: manual changeset detection, version/git-push steps, [ROLLBACK]/[DOCS] title conventions

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.

Test plan

  • Verify SHOPIFY_GH_ACCESS_TOKEN secret is provisioned in repo settings
  • Merge this PR → verify release workflow runs (creates release PR or no-ops if no changesets)
  • Create a test changeset PR → merge → verify [ci] release PR is created
  • Review and merge the release PR → verify npm publish succeeds
  • Verify new version on npmjs.com
  • Deploy via Shipit → verify CDN update

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 c6173bc to 215a2cc Compare March 15, 2026 02:39
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