Skip to content

Commit e6aa74d

Browse files
committed
Update release.yml
1 parent 6be3c20 commit e6aa74d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,17 +377,19 @@ jobs:
377377
publish-nuget:
378378
runs-on: ubuntu-latest
379379
needs: managed
380+
env:
381+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
380382
steps:
381383
- name: Download NuGet packages
382-
if: ${{ secrets.NUGET_API_KEY != '' }}
384+
if: ${{ env.NUGET_API_KEY != '' }}
383385
uses: actions/download-artifact@v4
384386
with:
385387
name: nuget-packages
386388
path: artifacts/nuget
387389

388390
- name: Push to NuGet.org
389-
if: ${{ secrets.NUGET_API_KEY != '' }}
390-
run: dotnet nuget push artifacts/nuget/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
391+
if: ${{ env.NUGET_API_KEY != '' }}
392+
run: dotnet nuget push artifacts/nuget/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate
391393

392394
github-release:
393395
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)