File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 release :
99 if : " contains(toJSON(github.event.commits.*.message), '[Release]')"
1010 runs-on : ubuntu-latest
11-
11+ permissions :
12+ id-token : write # enable GitHub OIDC token issuance for this job
13+
1214 steps :
1315 - uses : actions/checkout@v5
1416 - name : Setup .NET
@@ -21,13 +23,19 @@ jobs:
2123 run : dotnet build -c Release --no-restore
2224 - name : Pack TwitchLib.Client
2325 run : dotnet pack -v normal -c Release --no-build
26+ # Get a short-lived NuGet API key
27+ - name : NuGet login (OIDC → temp API key)
28+ uses : NuGet/login@v1
29+ id : login
30+ with :
31+ user : ${{ secrets.NUGET_USER }}
2432 - name : Push to Nuget
25- run : dotnet nuget push "./artifacts/package/release/*.nupkg" -k ${{ secrets.API_NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json
33+ run : dotnet nuget push "./artifacts/package/release/*.nupkg" --api-key ${{steps.login.outputs.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
2634 - name : Send Discord Notification
2735 uses : sarisia/actions-status-discord@v1
2836 if : always()
2937 with :
3038 webhook : ${{ secrets.DISCORD_WEBHOOK }}
3139 title : " Release Nuget Package"
3240 username : " TwitchLib Deploy"
33-
41+
You can’t perform that action at this time.
0 commit comments