From d2144c1b8132376f53689df19746560d4a91afdf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 08:54:29 +0000 Subject: [PATCH 1/2] Initial plan From 1981e1696d4b7de2c59a56741fa725e5b1b5db33 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 08:56:09 +0000 Subject: [PATCH 2/2] Fix publish step to handle missing .snupkg files gracefully Co-authored-by: reneschulte <7439129+reneschulte@users.noreply.github.com> --- .github/workflows/build-nuget.yml | 38 +++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-nuget.yml b/.github/workflows/build-nuget.yml index c1c7fbc..2c8f2be 100644 --- a/.github/workflows/build-nuget.yml +++ b/.github/workflows/build-nuget.yml @@ -77,5 +77,39 @@ jobs: - name: Publish to NuGet run: | - 3rdParty\nuget\nuget push Build\nuget\*.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_API_KEY }} - shell: cmd + # Check for .nupkg files (must exist) + $nupkgFiles = Get-ChildItem -Path "Build\nuget\*.nupkg" -ErrorAction SilentlyContinue + if ($null -eq $nupkgFiles -or $nupkgFiles.Count -eq 0) { + Write-Error "No .nupkg files found in Build\nuget\" + exit 1 + } + + # Push all .nupkg files + Write-Host "Pushing $($nupkgFiles.Count) .nupkg file(s)..." + foreach ($pkg in $nupkgFiles) { + Write-Host "Pushing $($pkg.Name)..." + & "3rdParty\nuget\nuget.exe" push $pkg.FullName -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_API_KEY }} + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to push $($pkg.Name)" + exit $LASTEXITCODE + } + } + + # Check for .snupkg files (optional) + $snupkgFiles = Get-ChildItem -Path "Build\nuget\*.snupkg" -ErrorAction SilentlyContinue + if ($null -eq $snupkgFiles -or $snupkgFiles.Count -eq 0) { + Write-Host "No .snupkg found - skipping." + } else { + Write-Host "Pushing $($snupkgFiles.Count) .snupkg file(s)..." + foreach ($pkg in $snupkgFiles) { + Write-Host "Pushing $($pkg.Name)..." + & "3rdParty\nuget\nuget.exe" push $pkg.FullName -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_API_KEY }} + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to push $($pkg.Name)" + exit $LASTEXITCODE + } + } + } + + Write-Host "Publish completed successfully!" + shell: pwsh