workflows/release-binaries: Move environment declaration to upload job (#212687)

This is the only job that actually needs to use the environment secrets,
so the environment must be declared. We were using secrets in the
prepare job to do a permissions check, but this is unnecessary, because
that job does not do anything that is security sensitive.

Only the upload job needs to have these permission checks and these are
already included in the upload-release-artifact composite action.
This commit is contained in:
Tom Stellard 2026-07-31 13:00:46 -07:00 committed by GitHub
parent 8631e82ddb
commit 02bde07167
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,9 +53,6 @@ permissions:
jobs:
prepare:
name: Prepare to build binaries
environment:
deployment: false
name: ${{ case( github.event_name == 'pull_request', null, 'release') }}
runs-on: ${{ inputs.runs-on }}
if: github.repository_owner == 'llvm'
outputs:
@ -83,14 +80,6 @@ jobs:
with:
release-version: ${{ inputs.release-version }}
- name: Check Permissions
if: github.event_name != 'pull_request'
uses: ./.github/workflows/require-team-membership
with:
team-slug: llvm-release-managers
LLVM_TOKEN_GENERATOR_CLIENT_ID: ${{ secrets.LLVM_TOKEN_GENERATOR_CLIENT_ID }}
LLVM_TOKEN_GENERATOR_PRIVATE_KEY: ${{ secrets.LLVM_TOKEN_GENERATOR_PRIVATE_KEY }}
# The name of the Windows binaries uses the version from source, so we need
# to fetch it here.
- id: version-from-source
@ -368,6 +357,9 @@ jobs:
upload-release-binaries:
name: "Upload Release Binaries"
environment:
deployment: false
name: release
needs:
- prepare
- build-release-package