docs/solutions/workflow-issues/2026-04-24-changeset-pr-auto-release-checkbox.md
Changeset PRs create a follow-up [Release] Version packages PR after merge. When the author wants that release PR to merge automatically, the intent needs to live on the original PR and be enforceable by workflow automation.
GITHUB_TOKEN is risky because GitHub suppresses workflow runs triggered by that token, which can prevent the publish workflow from firing after the release PR merge.[Release] Version packages PRs leaves the required CI check skipped, so GitHub auto-merge stays blocked.Use a managed PR-body checkbox plus release workflow enforcement:
pull_request_target workflow that checks out base code, reads PR file names through the GitHub API, and upserts the checkbox only when the PR contains a real .changeset/*.md file.minor or major changeset to unchecked.main.API_TOKEN_GITHUB for the merge path so the follow-up publish workflow can run.Version packages.env:
GH_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
run: |
if [[ -z "${GH_TOKEN}" ]]; then
echo "API_TOKEN_GITHUB is required so the auto-merged release PR can trigger publish workflows."
exit 1
fi
gh pr merge "$RELEASE_PR" --auto --squash --delete-branch
The PR body is the right place for human release intent because it is visible before merge and preserved with the PR. The workflow is the right place for enforcement because it can prove the PR actually has a changeset and can connect the merged source PR to the release PR generated by changesets/action.
Using the PAT is the critical bit. The release PR merge must create the normal push event that runs the publish path.
Generated release PRs are the output of that intent, not a new decision point. They should not get their own Auto release checkbox. If branch rules require CI, release PRs need a successful CI run rather than a skipped one.
minor and major releases an explicit opt-in.Version packages from checkbox management.pull_request_target, only run trusted base-repo code and read untrusted PR data through the GitHub API.GITHUB_TOKEN for workflow-triggering release merges.