File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616jobs :
1717 build :
1818 runs-on : ubuntu-latest
19+ permissions :
20+ contents : read
21+ checks : write # Required for dorny/test-reporter to create check runs
1922 steps :
2023 - uses : actions/checkout@v6
2124 with :
6366 deploy :
6467 runs-on : ubuntu-latest
6568 needs : [ build ]
69+ permissions :
70+ packages : write # Required to publish to GitHub Packages
71+ id-token : write # Required for NuGet trusted publishing (OIDC)
6672 steps :
6773 # Download the NuGet package created in the previous job
6874 - uses : actions/download-artifact@v8
8187 run : |
8288 dotnet nuget push ${NuGetDirectory}/*.nupkg --api-key "${{ secrets.GITHUB_TOKEN }}" --source "https://nuget.pkg.github.com/crispthinking/index.json" --skip-duplicate
8389
90+ - name : NuGet login (OIDC → temp API key)
91+ if : github.event_name == 'release'
92+ uses : NuGet/login@v1
93+ id : login
94+ with :
95+ user : ${{ secrets.NUGET_USER }}
96+
8497 - name : Publish NuGet package
8598 if : github.event_name == 'release'
8699 run : |
87- dotnet nuget push ${NuGetDirectory}/*.nupkg --api-key "${{ secrets.NUGET_APIKEY }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate
100+ dotnet nuget push ${NuGetDirectory}/*.nupkg --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate
You can’t perform that action at this time.
0 commit comments