From bf64dda1b97e964f9719a6217572a96af15a58eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dean=20Qui=C3=B1anola?= Date: Fri, 30 Oct 2026 15:08:00 -0700 Subject: [PATCH] ci: open release PRs with the app token again Since #401 the built-in token handles both tagging and release PRs. GitHub does not start pull_request workflows for events made with the built-in token, so the next release PR would never get the required Validation check, and ci.yml's Guard expects runpod-release-please-bot as the author. Run release-please twice: the built-in token tags and creates releases (skip-github-pull-request), then the app token opens or updates the release PR (skip-github-release). The app does not need the workflows permission for PRs. --- .github/workflows/release-please.yml | 31 +++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index d38379cf..decba84a 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -27,15 +27,36 @@ jobs: tag_name: ${{ steps.release.outputs.tag_name }} steps: - - name: Run Release Please + # Releases and release PRs use different tokens. + # + # Tagging: the built-in token. The release app lacks the workflows + # permission, and GitHub requires it to tag a commit whose history + # changes .github/workflows/ unless a branch already points at it. + # Run this step first so a merged release PR is tagged before the + # PR step looks for it. + - name: Create release uses: google-github-actions/release-please-action@v4 id: release with: - # The built-in token, as runpod-python uses. The release app lacks the - # workflows permission #399 requested, so its token can't be created. - # The workflow-level permissions grant contents, pull-requests and - # issues write. token: ${{ secrets.GITHUB_TOKEN }} + skip-github-pull-request: true + + # Release PRs: the app token. GitHub does not start pull_request + # workflows for events made with the built-in token, so a release PR + # opened with it never gets the required Validation check. ci.yml's + # Guard also expects runpod-release-please-bot as the author. + - name: Generate GitHub App Token + id: app-token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.RELEASE_APP_ID }} + private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} + + - name: Open or update release PR + uses: google-github-actions/release-please-action@v4 + with: + token: ${{ steps.app-token.outputs.token }} + skip-github-release: true pypi-publish: name: PyPI Publish