Skip to content

fix(ci): enable automatic Release PR creation in changesets workflow#543

Merged
cameri merged 4 commits intomainfrom
changesets-migration
Apr 20, 2026
Merged

fix(ci): enable automatic Release PR creation in changesets workflow#543
cameri merged 4 commits intomainfrom
changesets-migration

Conversation

@phoenix-server
Copy link
Copy Markdown
Collaborator

Summary

Fixes the changesets workflow to properly create Release PRs when changesets are detected on the main branch.

Problem

The changesets workflow had two critical issues preventing automatic Release PR creation:

  1. Missing commit permission: .changeset/config.json had "commit": false, which prevented changesets/action@v1 from committing version changes
  2. Missing workflow permissions: The workflow lacked explicit contents: write and pull-requests: write permissions

As a result, 14 pending changesets from 69 commits since v2.1.0 were not being released.

Changes

1. Enable commits in changeset config (commit 1ff7c04)

  • Set "commit": true in .changeset/config.json
  • Added commitMessage template for consistency: "chore(release): version packages\n\n[skip ci]"
  • Added Release PR title config to workflow: "chore(release): version packages"

2. Add workflow permissions (commit 7955109)

  • Added permissions: contents: write (to commit version changes)
  • Added permissions: pull-requests: write (to create Release PRs)

3. Fix linting violation

  • Formatted if/else blocks in test/integration/features/rate-limiter/rate-limiter.ts to meet linting standards

How the Release Pipeline Now Works

  1. Changesets accumulate: PRs merge to main with .changeset/ entries
  2. Workflow triggers: changesets.yml runs on push to main
  3. Release PR created: changesets/action detects pending changes → creates "Version Packages" PR
  4. Maintainer merges: Release PR is reviewed and merged
  5. Publish step runs:
    • npm run changeset:version updates package.json and CHANGELOG.md
    • npm run changeset:tag creates git tags
  6. GitHub release created: changesets/action creates GitHub release
  7. Docker image built: release.yml workflow triggered → image pushed to GHCR

Verification

  • ✅ All pre-commit checks pass (lint, type-check, build)
  • ✅ 14 changesets ready for release
  • ✅ CONTRIBUTING.md documents the process correctly
  • ✅ All three workflows properly configured

Next Step

Merge this PR to enable automatic Release PR creation on the next push to main.

- Set 'commit: true' in .changeset/config.json so changesets/action@v1 can commit version changes
- Add commitMessage template to match release prefix
- Add 'title' option to changesets/action for consistent Release PR naming
- Without these fixes, Release PR was not being created despite 14 pending changesets

This enables the full workflow:
1. changesets.yml detects changesets and creates 'Version Packages' PR
2. PR merges → publish step runs (changeset:tag)
3. GitHub release created → release.yml builds Docker image

Also fix: format if/else blocks in rate-limiter test to meet linting standards
- Add 'contents: write' for committing version changes
- Add 'pull-requests: write' for creating Release PRs

These permissions are required for changesets/action to properly
create and manage the Release PR workflow.
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 19, 2026

Coverage Status

coverage: 73.17%. remained the same — changesets-migration into main

@cameri cameri merged commit 704cba1 into main Apr 20, 2026
14 checks passed
@cameri cameri deleted the changesets-migration branch April 20, 2026 01:43
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.

3 participants