ci: rehearse the NuGet OIDC login in the release dry run#88
Merged
Conversation
The manual dry run stopped after the provenance attestation and skipped the
NuGet login along with the push and the GitHub Release — so the one thing a
dry run could not catch was a broken NuGet trusted-publishing setup, which was
only ever discovered during a real release.
Un-gate the NuGet OIDC login so it runs on every trigger, including a dry run:
the OIDC token exchange is what validates the trusted-publishing policy, so a
dry run now fails red when the policy or the NUGET_USER secret is missing or
misconfigured (chosen deliberately — a fatal signal, not a log line). It mints
a short-lived, single-use key the dry run never spends; the push and the GitHub
Release stay gated on dry_run == false, so nothing is published. A tag push is
unaffected (it already ran the login).
Maintainers/ReleaseDryRun.{en,fr}.md updated: the login moves from the skipped
column to "runs in a dry run", and a new Impacts note explains it mints an
unused token and that a dry run requires the trusted-publishing policy.
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
The manual dry run stopped after the provenance attestation and skipped the NuGet login (along with the push and GitHub Release), so a broken NuGet trusted-publishing setup was the one thing a dry run could not catch — it surfaced only during a real release. This un-gates the NuGet OIDC login so the dry run rehearses it.
Type of change
Changes
.github/workflows/release.yml: the NuGet login (OIDC) step loses itsdry_rungate and now runs on every trigger. The OIDC token exchange validates the trusted-publishing policy, so a dry run fails red when the policy or theNUGET_USERsecret is missing/misconfigured (design decision: a fatal signal, not a log line). It mints a short-lived, single-use key the dry run never spends; Push to NuGet and Publish GitHub Release stay gated ondry_run == false, so nothing is published. A tag push is unaffected (it already ran the login).maintainers/ReleaseDryRun.en.md/.fr.md: the login moves from "skipped" to "runs in a dry run", with a new Impacts note that it mints an unused token and that a dry run now requires the trusted-publishing policy.Testing
dotnet build FirstClassErrors.slndotnet test FirstClassErrors.slnFirstClassErrors.Analyzers.UnitTests)Not applicable:
release.ymlruns only on tags /workflow_dispatch, so no PR CI job exercises it. Verified structurally: YAML parses; the login step carries noif:(runs on all triggers) while Push and GitHub Release keepif: github.event_name == 'push' || inputs.dry_run == false. End-to-end proof is the next manual dry run (workflow_dispatch,dry_runticked): it will now exercise the OIDC exchange and fail if trusted publishing is not configured.Documentation
maintainers/doc is operational, kept separate fromdoc/).🤖 Generated with Claude Code
https://claude.ai/code/session_01AbXi2ZEaUFeFWodNxdY6Zk
Generated by Claude Code