diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5cea506f0..36fa47aea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -298,23 +298,32 @@ jobs: - name: Create PR to merge release back to main if: ${{ !inputs.dry_run }} + continue-on-error: true env: GH_TOKEN: ${{ github.token }} BRANCH: ${{ needs.validate-version.outputs.branch }} VERSION: ${{ inputs.version }} run: | - EXISTING_PR=$(gh pr list --base main --head "$BRANCH" --state open --json number --jq '.[0].number') + # Non-fatal: repos that disable "Allow GitHub Actions to create and + # approve pull requests" cause this step to fail with GraphQL 403. + # The release itself (tag + npm publish + GitHub Release) must still + # proceed. Open the merge-back PR manually afterwards with: + # gh pr create --base main --head release/${VERSION} \ + # --title "chore: merge release v${VERSION} to main" + EXISTING_PR=$(gh pr list --base main --head "$BRANCH" --state open --json number --jq '.[0].number' 2>/dev/null || echo "") if [ -n "$EXISTING_PR" ]; then echo "PR #$EXISTING_PR already exists; updating" gh pr edit "$EXISTING_PR" \ --title "chore: merge release v${VERSION} to main" \ - --body "Merge release branch back to main after v${VERSION} stable release." + --body "Merge release branch back to main after v${VERSION} stable release." \ + || echo "::warning::Could not update merge-back PR (likely PR-creation policy disabled). Open it manually after release." else gh pr create \ --base main \ --head "$BRANCH" \ --title "chore: merge release v${VERSION} to main" \ - --body "Merge release branch back to main after v${VERSION} stable release." + --body "Merge release branch back to main after v${VERSION} stable release." \ + || echo "::warning::Could not create merge-back PR (likely PR-creation policy disabled). Open it manually after release." fi - name: Tag and push