NewsSecurityDeveloper Tools

NuGet Staged Publishing: Separate Upload from Release

NuGet.org shipped staged publishing on November 17, and it changes a 15-year-old assumption baked into every .NET release pipeline: that uploading a package and releasing it are the same action. They are not anymore. Microsoft’s framing says it plainly: “A successful build tells you that your pipeline finished. It does not tell you that you meant to release.”

What Staged Publishing Actually Does

When you push in staging mode, your package goes through NuGet.org’s normal validation — virus scanning, metadata checks, format verification — but it stays completely private. No consumer can see it, download it, or reference it. It sits in a holding state until an authorized maintainer logs into NuGet.org and explicitly promotes it to public distribution.

Existing workflows are untouched. If you push today with dotnet nuget push and no staging flags, nothing changes. Staging is opt-in, and staged packages expire if you do not promote them — this prevents stale candidates from accumulating quietly in your account.

The Security Argument Is Solid

NuGet has had a rough 2026 on supply chain attacks. The Sicoob.Sdk incident in May delivered a package that stole banking PFX certificates — 484 downloads before removal. StripeApi.Net in February was a typosquatting attack that exfiltrated Stripe API keys from developer machines. These are not theoretical problems.

The key mechanism staged publishing adds is a new staging-only API key. You give this key to your CI pipeline instead of a full publish key. A pipeline running with a staging-only key can push packages for review — but it cannot release them publicly. If that key gets compromised, the attacker can upload noise into your staging queue. They cannot ship it to your users.

Microsoft has been layering NuGet security improvements methodically: Trusted Publishing arrived in September 2025, API key lifetimes dropped to 30 days in August 2026, and staged publishing is now the third layer. Use all three together and you have a significantly harder target.

Staging Groups: Useful, With a Catch

If your project ships multiple packages in a coordinated release — a core SDK plus integration adapters, for example — you can organize them into a staging group and approve the group as a single action. That part works as expected.

What does not work: atomic release. Each package in the group distributes independently. There is a window where some packages are live and others are not. If your consumers pin the entire SDK suite in a single project file, they can hit a partially-deployed state. Plan for it. Atomic group release is on the roadmap but not yet shipped.

CLI Support: Partial Today, More Coming

The .NET 11 RC2 SDK added basic staging upload support. Promotion, however, is a NuGet.org website action only — there is no CLI approval command yet. Microsoft has open pull requests in the NuGet/Home repo for a full command set:

  • dotnet package stage push
  • dotnet package stage list
  • dotnet package stage group create
  • dotnet package stage group add

These are in development, not shipped. If you need a fully automated release pipeline with no manual step, staged publishing is not quite ready for that use case. For teams where a human release decision already exists in the process, this is ready now.

Who Should Adopt This Now

If your package has more than a handful of external consumers, switch your CI to a staging-only key today. The setup is a credential swap, not a workflow rewrite. When you are ready to release, log into NuGet.org and promote. The promotion step takes thirty seconds and adds a meaningful authorization boundary that your old push-on-merge workflow never had.

For projects shipping coordinated multi-package releases: adopt staged publishing, but document the non-atomic limitation for your team. Wait for the CLI promotion command before removing human steps from your release process entirely.

NuGet is now ahead of npm and PyPI on this specific feature. That gap will close — PyPI and Cargo are watching. For .NET teams, switching to a staging-only CI key is a no-brainer given the supply chain incidents this year. The full announcement and setup guide are on the .NET Blog.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:News