Skip to content

Commit 33e69c7

Browse files
committed
Add id-token permisison to release flow
1 parent 8981f08 commit 33e69c7

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
@@ -3,6 +3,8 @@ name: 🚀 Release
33
on:
44
release:
55
types: [published]
6+
permissions:
7+
id-token: write # Needed for Azure login with federated token
68
jobs:
79
publish:
810
name: 🚀 Publish to VS Code Marketplace
@@ -14,6 +16,9 @@ jobs:
1416
shell: pwsh
1517
run: |
1618
$token = $env:ACTIONS_ID_TOKEN_REQUEST_TOKEN
19+
if (-not $token) {
20+
throw "ID token not found in environment variables. Did you set permissions: id-token: write in the workflow?"
21+
}
1722
$uri = $env:ACTIONS_ID_TOKEN_REQUEST_URL
1823
$irmParams = @{
1924
Uri = $uri

0 commit comments

Comments
 (0)