Skip to content

Commit 9ddc81d

Browse files
committed
Run NuGet OIDC login in caller context, pass key to reusable workflow
1 parent d23bb2d commit 9ddc81d

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,21 @@ permissions:
88
id-token: write
99

1010
jobs:
11+
nuget-auth:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
id-token: write
15+
outputs:
16+
api-key: ${{ steps.login.outputs.NUGET_API_KEY }}
17+
steps:
18+
- name: NuGet login (OIDC trusted publishing)
19+
id: login
20+
uses: NuGet/login@v1
21+
with:
22+
user: ${{ secrets.NUGET_USER }}
23+
1124
release:
25+
needs: nuget-auth
1226
uses: reactiveui/actions-common/.github/workflows/workflow-common-release.yml@main
1327
with:
1428
solutionFile: ReactiveUI.Binding.SourceGenerators.slnx
@@ -18,4 +32,4 @@ jobs:
1832
ES_PASSWORD: ${{ secrets.ES_PASSWORD }}
1933
CREDENTIAL_ID: ${{ secrets.CREDENTIAL_ID }}
2034
ES_TOTP_SECRET: ${{ secrets.ES_TOTP_SECRET }}
21-
NUGET_USER: ${{ secrets.NUGET_USER }}
35+
NUGET_API_KEY: ${{ needs.nuget-auth.outputs.api-key }}

0 commit comments

Comments
 (0)