From 60c7921ee94635d0fdfe9498ffa39c52912c3f73 Mon Sep 17 00:00:00 2001 From: "gp42-ops (GitHub)" <91820843+gp42-ops@users.noreply.github.com> Date: Sat, 14 Nov 2026 13:52:07 +0200 Subject: [PATCH] ci: read release credentials from the release environment The release job now runs in the `release` environment when it pushes the version bump to main, so it reads the GitHub App credentials from that environment. Prereleases from other branches and tag pushes don't use the App token and run without the environment, since it is limited to main. --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0a9a63..2f9aa48 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,10 @@ jobs: if: >- (github.event_name == 'push' && !startsWith(github.event.head_commit.message, 'chore(version):')) || github.event_name == 'workflow_dispatch' + # The App credentials live in the `release` environment, which only main + # can use. Only the stable path (push to main) needs them; prereleases + # from other branches and tag pushes run without the environment. + environment: ${{ (github.event_name == 'push' && github.ref_type != 'tag') && 'release' || '' }} runs-on: ubuntu-latest permissions: contents: write