File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 11name : Publish Client Libraries
22
33# Triggered on release creation. Also supports manual dispatch for testing.
4- # Secrets required:
5- # NUGET_API_KEY - NuGet.org API key for dotnet nuget push
4+ #
5+ # nuget uses OIDC Trusted Publishing: https://www. nuget.org/account/trustedpublishing
66#
77# npm publishing uses OIDC Trusted Publishing — no NPM_TOKEN required.
88# Configure the trusted publisher at: npmjs.com → Package → Settings → Trusted Publisher
2727 runs-on : ubuntu-latest
2828 permissions :
2929 contents : read
30- id-token : write # required for npm provenance attestation
30+ id-token : write # required for nuget/ npm provenance attestation
3131
3232 steps :
3333 - name : Checkout
@@ -70,10 +70,17 @@ jobs:
7070 /p:Version=${{ steps.version.outputs.version }}
7171 --output clients/csharp/bin/Release
7272
73+ # Get a short-lived NuGet API key
74+ - name : NuGet login (OIDC → temp API key)
75+ uses : NuGet/login@v1
76+ id : login
77+ with :
78+ user : Universalis
79+
7380 - name : Push to NuGet.org
7481 run : >
7582 dotnet nuget push clients/csharp/bin/Release/*.nupkg
76- --api-key ${{ secrets .NUGET_API_KEY }}
83+ --api-key ${{ steps.login.outputs .NUGET_API_KEY }}
7784 --source https://api.nuget.org/v3/index.json
7885 --skip-duplicate
7986
You can’t perform that action at this time.
0 commit comments