Skip to content

fix(ci): gate nuget.org publish on all-platform success - #250

Merged
MaxRev-Dev merged 4 commits into
mainfrom
fix/ci-gate-nuget-publish
Sep 25, 2026
Merged

MaxRev-Dev merged 4 commits into
mainfrom
fix/ci-gate-nuget-publish

Conversation

@MaxRev-Dev

@MaxRev-Dev MaxRev-Dev commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

What changed

Removes the per-platform Push packages step from unix.yml, macos.yml, and windows.yml PushPackages jobs. These steps pushed each platform's NuGet packages to nuget.org independently, gated only on that platform's own tests.

main.yml TestAndPushPackages (which already needs all three platform workflows) now downloads the per-platform bundle artifacts (packages-unix-final, packages-osx-final) alongside the raw per-architecture packages, and publishes the complete package set in a single push after all platforms pass and the final integration test succeeds.

The canonical Linux-built packages-core is re-downloaded last to overwrite the duplicate Core nupkg that osx and win publish-makefiles also pack into their bundle artifacts.

Per-platform bundle builds and artifact uploads are preserved - only the independent nuget.org push is removed.

Behavioural notes

  • A commit that skips a platform on main (e.g. [skip unix]) now publishes nothing to nuget.org, since TestAndPushPackages requires all three platform workflows to succeed. Previously, the remaining platforms still pushed their packages independently.
  • PushPackages-Windows is left as a no-op job for now; removing it is deferred to a follow-up.

Why

Run 36090066720 on 2025-09-25: Windows build failed, but Linux tests passed, so PushPackages-Linux published MaxRev.Gdal.Core, LinuxRuntime.Minimal.x64/.arm64, and CLI.linux-* at version 3.13.3.573 to nuget.org. No matching Windows or macOS packages were ever published - an orphan partial release.

Verification

  • All four YAML files pass python yaml.safe_load validation
  • git diff --stat origin/main confirms only the 4 intended workflow files changed
  • push-packages-makefile uses --skip-duplicate, so re-runs remain safe
  • PR builds still produce all artifacts (per-platform bundles, raw packages) - only the independent nuget.org push is removed
  • Version numbers (BUILD_NUMBER_TAIL=github.run_number) are unchanged
  • packages-core re-download as the last artifact step ensures the canonical Linux-built Core is the one published

Previously each platform's PushPackages job pushed to nuget.org as
soon as its own tests passed, independently of other platforms. When
Windows failed in run 36090066720, Linux packages (MaxRev.Gdal.Core,
LinuxRuntime.Minimal.x64/.arm64, CLI.linux-*) reached nuget.org at
3.13.3.573 with no matching Windows or macOS packages - an orphan
partial release.

Remove the per-platform nuget.org push from unix.yml, macos.yml, and
windows.yml PushPackages jobs. The per-platform bundle build and
artifact upload steps are preserved. main.yml TestAndPushPackages
(which already gates on all three platform workflows) now downloads
the per-platform bundle artifacts (packages-unix-final,
packages-osx-final) and publishes the complete package set to
nuget.org in one shot, after all platforms succeed and the final
integration test passes. The existing --skip-duplicate flag keeps
re-runs safe.
Finds every MaxRev.Gdal.* package that has the given version and
unlists it with dotnet nuget delete. Dry run by default; --yes to
apply. Used to clean up the orphaned 3.13.3.573 packages.
packages-osx-final (and the raw osx/win artifacts) contain a
macOS-built copy of MaxRev.Gdal.Core under the same filename.
With merge-multiple the last download wins, so the Core published
to nuget.org could silently become the macOS build instead of the
canonical Linux x64 one from packages-core. Re-download packages-core
as the final artifact step to guarantee it overwrites any duplicate.
@MaxRev-Dev
MaxRev-Dev merged commit ec3a1c3 into main Sep 25, 2026
1 of 6 checks passed
@MaxRev-Dev
MaxRev-Dev deleted the fix/ci-gate-nuget-publish branch September 25, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant