ci: reshape publish.yaml to inline composite action (pinned @v1) for trusted publishing - #2
Merged
Merged
Conversation
monsieurleberre
had a problem deploying
to
nuget-publish
June 11, 2026 14:37 — with
GitHub Actions
Failure
monsieurleberre
had a problem deploying
to
nuget-publish
June 11, 2026 14:41 — with
GitHub Actions
Failure
peaceful-bot
temporarily deployed
to
nuget-publish
June 11, 2026 15:19 — with
GitHub Actions
Inactive
monsieurleberre
enabled auto-merge (squash)
June 11, 2026 17:04
peaceful-bot
approved these changes
Jun 11, 2026
monsieurleberre
disabled auto-merge
June 11, 2026 17:18
The shared csharp-publish-public.yaml@v1 now mints a short-lived nuget.org key via OIDC (NuGet/login). The calling job must grant id-token: write or the OIDC token request fails.
…shing Mint the OIDC token in this publish.yaml job via NuGet/login with id-token: write, so job_workflow_ref resolves to dotnet-extensions/.github/workflows/publish.yaml (the nuget.org Trusted Publishing policy anchor). The heavy lifting moves to the csharp-publish composite action invoked as an inline step, which does not change job_workflow_ref.
monsieurleberre
force-pushed
the
fix/trusted-publishing-id-token
branch
from
June 11, 2026 17:21
408aaad to
b7256b8
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.
Why
nuget.org Trusted Publishing validates the OIDC
job_workflow_refclaim, and the policy is anchored onpeacefulstudio/dotnet-extensions/.github/workflows/publish.yaml. The previouspublish.yamlcalled a reusable workflow (jobs.publish.uses: .../csharp-publish-public.yaml@v1), which runs the job in thegithub-actionsrepo and stampsjob_workflow_refasgithub-actions/...-> live HTTP 401 on push.What changed (only
publish.yaml)publishis now a normal job (nojobs.publish.uses:), so the job runs in this repo andjob_workflow_refresolves todotnet-extensions/.github/workflows/publish.yaml.NuGet/loginruns in this job withid-token: write, minting the short-lived key here so the token carries the correctjob_workflow_ref.steps: - uses:step. A composite action does not changejob_workflow_ref. The caller passes the short-lived key in viaapi-key; the composite does NOT do its own login.Composite action ref
Now pinned to the stable release:
v1ofpeacefulstudio/github-actionshas been advanced to include thecsharp-publishcomposite action. The earlier0.2.1-preview.2test publish already validated this path end-to-end against the feature branch; this PR simply repoints the same flow at the stable tag.Notes
.github/changes require a human maintainer to merge.