From a2e89f0b8feabe985efd5148b8dcd56ff4d869a9 Mon Sep 17 00:00:00 2001 From: byteland-app <180143704+byteland-app@users.noreply.github.com> Date: Thu, 26 Nov 2026 10:09:35 +0000 Subject: [PATCH] ci(release): restore GITHUB_TOKEN for release-please - Remove the GitHub App token step and guards from release.yml. - Restore contents, issues and pull-requests write access on the job. - Prohibit GitHub App token changes for release-please in AGENTS.md. --- .github/workflows/release.yml | 31 +++++-------------------------- AGENTS.md | 3 +++ 2 files changed, 8 insertions(+), 26 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b0b2fc..c904edd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,14 +13,7 @@ # publish-github authenticates with GITHUB_TOKEN. The OIDC policies on npm and # on crates.io must name this file (release.yml). GitHub links # @bytelandtechnology/tunelet to this repository through the repository field. -# -# The release-please job uses a GitHub App token from vars.APP_CLIENT_ID and -# secrets.APP_PRIVATE_KEY. If vars.APP_CLIENT_ID or secrets.APP_PRIVATE_KEY is -# empty, the workflow skips release-please. Register the GitHub App on this -# repository with write access only to contents, issues and pull requests. When -# release-please updates the release pull request, ci.yml runs verify on -# head_sha automatically. A branch ruleset on main must require verify before -# merge. +# The release-please job uses the default GITHUB_TOKEN. name: Release on: @@ -36,32 +29,18 @@ permissions: {} jobs: release-please: - if: ${{ vars.APP_CLIENT_ID != '' }} runs-on: ubuntu-latest timeout-minutes: 10 - permissions: {} - env: - HAS_APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY != '' && 'true' || 'false' }} + permissions: + contents: write + issues: write + pull-requests: write outputs: release_created: ${{ steps.release.outputs.release_created }} tag_name: ${{ steps.release.outputs.tag_name }} steps: - # If secrets.APP_PRIVATE_KEY is set, the action gets a one-hour GitHub - # App token for this repository and revokes it when the job ends. - - id: app-token - if: ${{ env.HAS_APP_PRIVATE_KEY == 'true' }} - uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0 - with: - client-id: ${{ vars.APP_CLIENT_ID }} - private-key: ${{ secrets.APP_PRIVATE_KEY }} - permission-contents: write - permission-issues: write - permission-pull-requests: write - id: release - if: ${{ steps.app-token.outputs.token != '' }} uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 - with: - token: ${{ steps.app-token.outputs.token }} build-wasm: needs: release-please diff --git a/AGENTS.md b/AGENTS.md index c7c1ba7..dfa282b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -178,6 +178,9 @@ npm run verify:pack to make it look better. - Do not change fixed-point calculations to floating-point calculations. - Do not edit the generated files in `pkg/` or `dist/`. +- Do not change `release-please` in `.github/workflows/release.yml` to a + GitHub App token. Keep `GITHUB_TOKEN` with write access to `contents`, + `issues` and `pull-requests`. ## Work method