Skip to content

Commit

Permalink
GitHubCI: rather check NUGET_API_KEY in GHActions' if
Browse files Browse the repository at this point in the history
  • Loading branch information
knocte committed Apr 11, 2024
1 parent 0413cc1 commit a691a3d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ jobs:
--property:Version=$VERSION
- name: Push
if: github.event_name == 'push' && github.ref == 'refs/heads/upstream'
env:
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/upstream' && env.NUGET_API_KEY != '' }}
run: |
cd dist
if [ -n "${{secrets.NUGET_API_KEY}}" ]; then
dotnet nuget push *.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
fi
dotnet nuget push *.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json

0 comments on commit a691a3d

Please sign in to comment.