From 7ac6f3fa8eed7ae02d88b7e5a0af13ced4de4603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dean=20Qui=C3=B1anola?= Date: Fri, 30 Oct 2026 13:41:54 -0700 Subject: [PATCH] ci: tag releases with the release app's workflows permission Justin's tag probe (#402) showed GITHUB_TOKEN gets a 403 tagging the 1.21.1 release commit but a 201 tagging the v1.21.0 commit. The response accepts contents+workflows, and #395 changed a workflow file since v1.21.0. GITHUB_TOKEN can never hold workflows, so switch back to the release app and request contents, pull-requests and workflows. issues is dropped: the app doesn't have it and release-please's PR labels and comments work with pull-requests. --- .github/workflows/release-please.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index d38379cf..fcdc2f64 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -27,15 +27,24 @@ jobs: tag_name: ${{ steps.release.outputs.tag_name }} steps: + - 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 }} + # Tagging a release whose commits change .github/workflows/ needs + # workflows: write, which GITHUB_TOKEN can never have (#402). PR labels + # and comments go through pull-requests, so issues isn't requested. + permission-contents: write + permission-pull-requests: write + permission-workflows: write + - name: Run Release Please 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 }} + token: ${{ steps.app-token.outputs.token }} pypi-publish: name: PyPI Publish