From 2719ddf72038dde944b5930d439d6386af03303c Mon Sep 17 00:00:00 2001 From: Admin Date: Sun, 28 Dec 2025 06:51:13 -0500 Subject: [PATCH] feat(ci): add NuGet push to nuget.org on main branch --- .gitea/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index b946aed..5710f6b 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -35,3 +35,12 @@ jobs: - name: List NuGet packages 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 }}