Skip to content

Commit 52141e2

Browse files
ncipollinaclaude
andcommitted
fix(ci): revert to single publish job with id-token: write
OIDC works in called workflows when both sides declare id-token: write. The separate get-nuget-token job approach had key transport issues. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5c319eb commit 52141e2

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

.github/workflows/publish-preview.yaml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,10 @@ on:
1212
permissions:
1313
contents: write
1414
pull-requests: write
15+
id-token: write
1516

1617
jobs:
17-
get-nuget-token:
18-
runs-on: ubuntu-latest
19-
permissions:
20-
id-token: write
21-
contents: read
22-
outputs:
23-
nuget_api_key: ${{ steps.login.outputs.NUGET_API_KEY }}
24-
steps:
25-
- name: NuGet Login (OIDC)
26-
uses: NuGet/login@v1
27-
id: login
28-
with:
29-
user: ${{ secrets.NUGET_USER }}
30-
3118
publish:
32-
needs: get-nuget-token
3319
uses: LayeredCraft/devops-templates/.github/workflows/publish-preview.yml@ci/github-nuget-oidc-login
3420
with:
3521
solution: LayeredCraft.Logging.CompactJsonFormatter.slnx
@@ -39,4 +25,4 @@ jobs:
3925
10.0.x
4026
11.0.x
4127
hasTests: true
42-
nuget_api_key: ${{ needs.get-nuget-token.outputs.nuget_api_key }}
28+
secrets: inherit

0 commit comments

Comments
 (0)