Skip to content

chore: replace semantic-release with changesets#196

Merged
TimPietruskyRunPod merged 2 commits intomainfrom
chore/migrate-to-changesets
Mar 13, 2026
Merged

chore: replace semantic-release with changesets#196
TimPietruskyRunPod merged 2 commits intomainfrom
chore/migrate-to-changesets

Conversation

@TimPietruskyRunPod
Copy link
Copy Markdown
Contributor

Summary

Fixes #184 — the automated release pipeline is broken because semantic-release pushes directly to main, which violates the org-level ruleset requiring 1 approving review on PRs.

Changesets works via PRs instead, which is compatible with the org rules. This follows the same pattern used by ai-sdk-provider.

Changes

  • Added package.json (v5.3.0, private: true) with @changesets/cli
  • Added .changeset/config.json targeting main branch
  • Rewrote .github/workflows/release.yml with two jobs:
    • release — runs changesets/action@v1 to create a "chore: version packages" PR when pending changesets exist
    • docker — builds and pushes all Docker images + creates GitHub release, only after the version PR is merged
  • Uses GITHUB_TOKEN (default) instead of GH_PAT — changesets creates PRs (not direct pushes), so no PAT needed
  • Added scripts/update-readme-version.js to replace the sed command from .releaserc
  • Added .dockerignore to exclude node_modules from Docker builds
  • Removed .releaserc (no longer needed)

New release flow

  1. Developer creates feature branch, runs pnpm changeset to add a changeset file
  2. PR is reviewed (1 approval per org rules) and merged to main
  3. Release workflow detects pending changesets → creates a "chore: version packages" PR with version bump + CHANGELOG + README version update
  4. Version PR is reviewed (1 approval) and merged
  5. Release workflow runs again → builds and pushes all Docker images, creates GitHub release + tag

Test plan

  • pnpm install succeeds, lockfile generated
  • pnpm changeset status works correctly
  • node scripts/update-readme-version.js updates README.md version references
  • After merge: release workflow creates "chore: version packages" PR
  • After version PR merge: Docker images built, GitHub release created

semantic-release pushes directly to main, which violates the org-level
ruleset requiring PR reviews. Changesets works via PRs instead.

- Add package.json (v5.3.0, private) with @changesets/cli
- Add .changeset/config.json targeting main branch
- Rewrite release.yml with two jobs: release (changesets/action) and
  docker (build+push only after version PR merge)
- Use default GITHUB_TOKEN instead of GH_PAT
- Add scripts/update-readme-version.js to replace sed-based version
  updates from .releaserc
- Add .dockerignore to exclude node_modules from builds
- Remove .releaserc (no longer needed)

Closes #184
Copy link
Copy Markdown

@justinwlin justinwlin left a comment

Choose a reason for hiding this comment

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

Good fix — changesets is the right call here and the two-phase job structure (changesets action → docker build) is the standard pattern. The Node.js README version updater is cleaner than the old sed approach.

A few things to keep in mind as you land this:

Verify 5.3.0 in package.json matches the latest released git tag. If it's off by a patch version the first automated release will produce a wrong version number.

workflow_dispatch was removed — there's now no way to manually trigger a release if the automated flow gets into a bad state. Worth restoring on the docker job at minimum.

Contributor documentation — every feature branch now needs a pnpm changeset run before merging or the release pipeline silently does nothing. A note in CONTRIBUTING.md (or the PR template) will save future contributors a confusing debugging session.

- Update package.json version to 5.7.1 to match latest git tag
- Restore workflow_dispatch trigger on release.yml so docker job can be manually triggered
- Add changeset documentation to CONTRIBUTING.md and PR template
@TimPietruskyRunPod TimPietruskyRunPod merged commit 0ffc6c5 into main Mar 13, 2026
2 checks passed
@TimPietruskyRunPod TimPietruskyRunPod deleted the chore/migrate-to-changesets branch March 13, 2026 14:39
theOnlyHorst pushed a commit to theOnlyHorst/worker-comfyui that referenced this pull request Mar 30, 2026
…te-to-changesets

chore: replace semantic-release with changesets
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.

The automated release is failing 🚨

3 participants