Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,23 @@ jobs:
-p:PackageVersion=${{ steps.vars.outputs.version }}
-o artifacts/packages

- name: Validate NuGet API key
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
shell: bash
run: |
if [[ -z "${NUGET_API_KEY}" ]]; then
echo "NUGET_API_KEY secret is missing or empty."
echo "Set repository secret NUGET_API_KEY before running release workflow."
exit 1
fi

- name: Push package to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: >
dotnet nuget push artifacts/packages/*.nupkg
--api-key ${{ secrets.NUGET_API_KEY }}
--api-key "${NUGET_API_KEY}"
--source https://api.nuget.org/v3/index.json
--skip-duplicate

Expand Down
Loading