Skip to content

Commit bfb0cae

Browse files
authored
ci(nuget): use Trusted Publishing auth (#1035)
Issue: DEVOPS-3949
1 parent a70e01d commit bfb0cae

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/nuget-publish.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@ jobs:
353353
if: ${{ needs.preflight.outputs.dry-run == 'false' }}
354354
needs: [preflight, build-managed]
355355
runs-on: ubuntu-latest
356+
permissions:
357+
id-token: write
356358

357359
steps:
358360
- name: Download NuGet package artifact
@@ -361,6 +363,12 @@ jobs:
361363
name: ironrdp-nupkg
362364
path: package
363365

366+
- name: NuGet login (OIDC)
367+
uses: NuGet/login@v1
368+
id: nuget-login
369+
with:
370+
user: ${{ secrets.NUGET_BOT_USERNAME }}
371+
364372
- name: Publish to nuget.org
365373
run: |
366374
$Files = Get-ChildItem -Recurse package/*.nupkg
@@ -372,7 +380,7 @@ jobs:
372380
'push',
373381
"$File",
374382
'--api-key',
375-
'${{ secrets.NUGET_API_KEY }}',
383+
'${{ steps.nuget-login.outputs.NUGET_API_KEY }}',
376384
'--source',
377385
'https://api.nuget.org/v3/index.json',
378386
'--skip-duplicate'

0 commit comments

Comments
 (0)