Skip to content

Commit 580f76d

Browse files
dovvnloadingclaude
andcommitted
Bind signing OIDC to a GitHub environment
A federated credential scoped to a tag matches the subject literally, so refs/tags/* never matched a real tag and token exchange failed with AADSTS700213. Running the job in the `release` environment gives a constant subject that holds across every version tag. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent c12db4c commit 580f76d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ permissions:
2626
jobs:
2727
build:
2828
runs-on: windows-latest
29+
# Binds the OIDC token's subject to `...:environment:release`, which stays
30+
# constant across tags. A federated credential scoped to a tag would have
31+
# to name one exact tag -- subjects are matched literally, so a wildcard
32+
# like refs/tags/* never matches a real tag at token exchange.
33+
environment: release
2934

3035
steps:
3136
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)