File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -272,6 +272,8 @@ jobs:
272272 if : github.event_name == 'workflow_dispatch' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v2')
273273 runs-on : ubuntu-latest
274274 needs : [ validate-nuget, run-test, validate-template, validate-docs ]
275+ permissions :
276+ id-token : write
275277 steps :
276278 - uses : actions/download-artifact@v5
277279 with :
@@ -284,5 +286,11 @@ jobs:
284286 - name : 🛠️ Upload library to GitHub Package Repository
285287 run : dotnet nuget push ${{ env.NUGET_DIRECTORY }}/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/bunit-dev/index.json --skip-duplicate --no-symbols
286288
289+ - name : 🛠️ NuGet login
290+ uses : NuGet/login@v1
291+ id : nuget-login
292+ with :
293+ user : ${{ secrets.NUGET_USER }}
294+
287295 - name : 🛠️ Upload library to NuGet.org repository
288- run : dotnet nuget push ${{ env.NUGET_DIRECTORY }}/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
296+ run : dotnet nuget push ${{ env.NUGET_DIRECTORY }}/*.nupkg -k ${{ steps.nuget-login.outputs.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
Original file line number Diff line number Diff line change @@ -101,9 +101,15 @@ jobs:
101101 dotnet pack src/bunit.web.query/ -c Release --property:PackageOutputPath=${GITHUB_WORKSPACE}/packages -p:ContinuousIntegrationBuild=true -p:publicrelease=true
102102 dotnet pack src/bunit.generators/ -c Release --property:PackageOutputPath=${GITHUB_WORKSPACE}/packages -p:ContinuousIntegrationBuild=true -p:publicrelease=true
103103
104+ - name : 🛠️ NuGet login
105+ uses : NuGet/login@v1
106+ id : nuget-login
107+ with :
108+ user : ${{ secrets.NUGET_USER }}
109+
104110 - name : 🛠️ Upload library to NuGet.org repository
105111 run : |
106- dotnet nuget push ${GITHUB_WORKSPACE}/packages/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
112+ dotnet nuget push ${GITHUB_WORKSPACE}/packages/*.nupkg -k ${{ steps.nuget-login.outputs.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
107113
108114 - name : ⏩ Push stable branch
109115 run : git push origin stable
You can’t perform that action at this time.
0 commit comments