File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -18,18 +18,13 @@ jobs:
1818 permissions :
1919 actions : read
2020 contents : write
21- id-token : write # Required for Azure CLI Login
21+ id-token : write # Required for Azure / NuGet CLI Login
2222 steps :
2323 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2424
2525 - name : ⚙️ Initialization
2626 shell : pwsh
2727 run : |
28- if ('${{ secrets.NUGET_API_KEY }}') {
29- Write-Host "NUGET_API_KEY secret detected. NuGet packages will be pushed."
30- echo "NUGET_API_KEY_DEFINED=true" >> $env:GITHUB_ENV
31- }
32-
3328 if ('${{ secrets.NPM_API_KEY }}') {
3429 Write-Host "NPM_API_KEY secret detected. NPM packages will be pushed."
3530 echo "NPM_API_KEY_DEFINED=true" >> $env:GITHUB_ENV
@@ -115,9 +110,14 @@ jobs:
115110 gh release -R ${{ github.repository }} upload "${{ github.ref_name }}" $_.FullName
116111 }
117112
113+ - name : 🪪 Authorize NuGet package push
114+ uses : NuGet/login@v1
115+ id : nuget-login
116+ with :
117+ user : ${{ secrets.NUGET_USER }}
118+
118119 - name : 🚀 Push NuGet packages
119- run : dotnet nuget push ${{ runner.temp }}\deployables\*.nupkg --source https://api.nuget.org/v3/index.json -k '${{ secrets.NUGET_API_KEY }}'
120- if : ${{ env.NUGET_API_KEY_DEFINED == 'true' }}
120+ run : dotnet nuget push ${{ runner.temp }}\deployables\*.nupkg --source https://api.nuget.org/v3/index.json -k '${{ steps.nuget-login.outputs.NUGET_API_KEY }}'
121121
122122 - name : 🚀 Push NPM packages
123123 shell : pwsh
You can’t perform that action at this time.
0 commit comments