feat(ci): add NuGet push to nuget.org on main branch
CI / Build and Test (push) Successful in 33s Details
Release to NuGet / Build and Publish to NuGet (push) Failing after 9s Details

This commit is contained in:
Admin 2025-12-28 06:51:13 -05:00
parent 7e58513ab3
commit 2719ddf720
1 changed files with 9 additions and 0 deletions

View File

@ -35,3 +35,12 @@ jobs:
- name: List NuGet packages - name: List NuGet packages
run: dir .\nupkg\ run: dir .\nupkg\
- name: Push to NuGet.org
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
foreach ($pkg in (Get-ChildItem .\nupkg\*.nupkg)) {
C:\dotnet\dotnet.exe nuget push $pkg.FullName --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
}
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}