Skip to content

Publish to NuGet through Trusted Publishing - #95

Merged
AngeloTadeucci merged 1 commit into
masterfrom
release-trusted-publishing
Nov 5, 2026
Merged

AngeloTadeucci merged 1 commit into
masterfrom
release-trusted-publishing

Conversation

@AngeloTadeucci

@AngeloTadeucci AngeloTadeucci commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

The NUGET_TOKEN API key expired. The v2.4.36 release run packed the package and pushed the v2.4.36 tag, then dotnet nuget push got 403 (The specified API key has expired...). No GitHub release was created and 2.4.36 never reached nuget.org. This PR moves the release job to nuget.org Trusted Publishing, so it no longer depends on a long-lived key.

Changes

  • .github/workflows/release.yml: the release job gets id-token: write so it can request a GitHub OIDC token. A new NuGet/login@v1 step, as user AngeloTadeucci, exchanges that token for a one-hour API key. Push uses the step's NUGET_API_KEY output instead of the NUGET_TOKEN secret.

nuget.org policy

The Trusted Publishing policy is saved and active on nuget.org:

  • Package owner AngeloTadeucci
  • Repository owner ms2community, repository maple2.file
  • Workflow file release.yml, no environment
  • Scope: push new packages and package versions

The check job skips the release when the version's tag already exists. The unpublished v2.4.36 tag has no package and no release, so it will be deleted before merge, and the merge then releases 2.4.36 from master.

Verification

Nothing has run yet. The release run on the merge commit is the first real test of the login and push steps.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

The NUGET_TOKEN API key expired, so the v2.4.36 release packed and
tagged but failed to push. The release job now requests a GitHub OIDC
token and exchanges it through NuGet/login for a one-hour API key, under
the nuget.org Trusted Publishing policy for release.yml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6b51a275-2410-4950-a253-260689ba0d3e
Commits

Reviewing files that changed from the base of the PR and between bad8e23 and a3cdcf1.

Files selected for processing: 1

  • .github/workflows/release.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@AngeloTadeucci
AngeloTadeucci merged commit 45a013a into master Nov 5, 2026
3 checks passed
@AngeloTadeucci
AngeloTadeucci deleted the release-trusted-publishing branch November 5, 2026 18:41
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