Repository navigation
Unify NuGet publishing into one workflow with trusted publishing - #375
Merged
Merged
Conversation
Replace CI-Maui.yml (GitHub Packages) and CI-Windows.yml (nuget.org) with a single publish.yml that builds once and pushes all five packages at one version (2.0.0.<run_number>). - nuget.org now uses OIDC trusted publishing via NuGet/login@v1 instead of a long-lived NUGET_API_TOKEN secret. - GitHub Packages publish is unchanged (GITHUB_TOKEN), and runs on every manual dispatch. - nuget.org publish is gated behind an explicit workflow_dispatch input (publish_to_nuget) so releases are deliberate, never on commit/merge. Trusted publishing policy on nuget.org must reference workflow file publish.yml. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
follesoe
force-pushed
the
ci/nuget-trusted-publishing
branch
from
June 22, 2026 21:06
a32adee to
9b47818
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the two separate publish workflows (
CI-Maui.yml→ GitHub Packages,CI-Windows.yml→ nuget.org) with a singlepublish.ymlthat builds once and pushes all five packages at one consistent version.What changed
2.0.0.<run_number>(VersionMainfromDirectory.Build.props+ the GitHub run number).NuGet/login@v1to mint a short-lived API key (id-token: write) instead of the long-livedNUGET_API_TOKENsecret.GITHUB_TOKEN(packages: write); pushed on every manual run.workflow_dispatchonly (never on commit/merge). The nuget.org push is gated behind apublish_to_nugetboolean input — leave it unticked for a GitHub Packages-only build, tick it to also release to nuget.org.Required nuget.org configuration
A Trusted Publishing policy must exist on nuget.org with:
follesoemicrocharts-dotnetMicrochartspublish.ymlOnce this merges, run the workflow once with
publish_to_nugetenabled within 7 days to lock the policy to permanently active. After a successful nuget.org publish, the oldNUGET_API_TOKENsecret can be deleted.🤖 Generated with Claude Code