Skip to content

Push to nuget.org with Trusted Publishing - #8

Merged
IOL0ol1 merged 2 commits into
masterfrom
ci/trusted-publishing
Nov 19, 2026
Merged

IOL0ol1 merged 2 commits into
masterfrom
ci/trusted-publishing

Conversation

@IOL0ol1

@IOL0ol1 IOL0ol1 commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Releases no longer use a stored NuGet API key. The publish job runs in the production environment and trades its GitHub OIDC token for a temporary nuget.org key (NuGet/login, pinned), matching the Trusted Publishing policy for OpenSlideSharp* (workflow release.yml, environment production). nuget.org checks the token's job_workflow_ref, so the upstream sync's call of release.yml matches too.

The repository variable NUGET_USER (the nuget.org profile name) turns releases on; without it every release stays a dry run. The upstream-sync caller grants id-token: write and no longer passes secrets. README and the plan 5 carry-over notes are updated.

The publish job runs in the production environment and trades its GitHub
OIDC token for a one-hour key (NuGet/login, pinned to v1.2.0) right
before the push, after every existing check. The repository variable
NUGET_USER, the nuget.org profile name, turns releases on in place of the
NUGET_API_KEY secret; without it a release stays a dry run.

The upstream sync grants the called release workflow id-token: write and
no longer passes secrets to it.
The old packages are deprecated and the nuget.org Trusted Publishing
policy exists. Left to do: set the NUGET_USER repository variable,
optionally restrict the production environment to master, and reserve
the OpenSlideSharp ID prefix before the first release.
@IOL0ol1
IOL0ol1 merged commit d072317 into master Nov 19, 2026
12 checks passed
@IOL0ol1
IOL0ol1 deleted the ci/trusted-publishing branch November 19, 2026 03:53
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