File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 4444 run : dotnet pack src/CodeContext.CLI/CodeContext.CLI.csproj --configuration Release --no-build -p:Version=${{ env.VERSION }} -o ./artifacts
4545
4646 - name : Push to NuGet
47- run : dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
47+ env :
48+ NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
49+ run : |
50+ if [ -z "$NUGET_API_KEY" ]; then
51+ echo "Warning: NUGET_API_KEY not set. Skipping NuGet push."
52+ echo "To enable automatic publishing, add NUGET_API_KEY to repository secrets."
53+ exit 0
54+ fi
55+ dotnet nuget push ./artifacts/*.nupkg --api-key $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