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
12 changes: 12 additions & 0 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
publish-nuget:
name: Publish to NuGet.org
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read

steps:
- name: Download release assets
Expand Down Expand Up @@ -46,11 +49,20 @@ jobs:

echo "Found $PACKAGE_COUNT package(s) to publish"

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


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