We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent adbe91c commit ceb25f4Copy full SHA for ceb25f4
1 file changed
.github/workflows/publish.yml
@@ -44,4 +44,12 @@ jobs:
44
run: dotnet pack src/CodeContext.CLI/CodeContext.CLI.csproj --configuration Release --no-build -p:Version=${{ env.VERSION }} -o ./artifacts
45
46
- 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
+ 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
0 commit comments