Skip to content

Commit b9a9d98

Browse files
feat(ci): auto-merge changesets release PRs once checks pass
The version-packages PR opened by changesets/action was previously opened and waited for a human merge. Enable auto-merge on it via gh pr merge --auto so the release pipeline becomes fire-and-forget: once CI is green, the PR squash-merges and the next release-npm.yml run publishes packages. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 29eb973 commit b9a9d98

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/release-npm.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,18 @@ jobs:
3737
run: pnpm run check
3838

3939
- name: Create release PR or publish packages
40+
id: changesets
4041
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
4142
with:
4243
version: pnpm run version:packages
4344
publish: pnpm run release:npm
4445
createGithubReleases: true
4546
env:
4647
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
49+
- name: Enable auto-merge on release PR
50+
if: steps.changesets.outputs.pullRequestNumber != ''
51+
env:
52+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
PR_NUMBER: ${{ steps.changesets.outputs.pullRequestNumber }}
54+
run: gh pr merge --auto --squash "$PR_NUMBER"

0 commit comments

Comments
 (0)