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
10 changes: 9 additions & 1 deletion .github/workflows/nuget-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write # enable GitHub OIDC token issuance for Trusted Publishing
steps:
- name: Checkout code
uses: actions/checkout@v6
Expand Down Expand Up @@ -58,9 +60,15 @@ jobs:
- name: List generated packages
run: find artifacts/package/release -name "*.nupkg" -type f

- name: NuGet login (OIDC -> short-lived API key)
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}

- name: Publish to NuGet
run: |
for package in artifacts/package/release/*.nupkg; do
echo "Publishing $package"
dotnet nuget push "$package" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push "$package" --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
done
Loading