Skip to content

Update NuGet dependencies to latest and switch to trusted publishing#3

Merged
StuartMeeks merged 2 commits into
mainfrom
chore/update-deps-and-trusted-publishing
Jun 10, 2026
Merged

Update NuGet dependencies to latest and switch to trusted publishing#3
StuartMeeks merged 2 commits into
mainfrom
chore/update-deps-and-trusted-publishing

Conversation

@StuartMeeks

Copy link
Copy Markdown
Owner

Summary

Two maintenance changes requested together:

1. Bump NuGet dependencies to latest stable

All package references updated to their latest non-prerelease versions. The intentionally capped NextIteration.SpectreConsole.Auth range ([0.6.1,1.0.0)) is left untouched.

Package Before After
Microsoft.Extensions.DependencyInjection.Abstractions 10.0.5 10.0.9
Microsoft.Extensions.Http 10.0.5 10.0.9
Spectre.Console 0.55.2 0.56.0
Microsoft.SourceLink.GitHub 8.0.0 10.0.300
Microsoft.Extensions.DependencyInjection 10.0.5 10.0.9
Microsoft.NET.Test.Sdk 17.11.1 18.6.0
xunit 2.9.2 2.9.3
xunit.runner.visualstudio 2.8.2 3.1.5
coverlet.collector 6.0.2 10.0.1

Build is clean (0 warnings, with TreatWarningsAsErrors) and all 59 tests pass. dotnet pack still produces both .nupkg and .snupkg.

2. Switch publishing to NuGet trusted publishing (OIDC)

The publish job no longer relies on a long-lived NUGET_API_KEY secret. Instead it:

  • grants the job id-token: write (plus contents: read),
  • uses NuGet/login@v1 immediately before push to exchange the GitHub OIDC token for a short-lived (1-hour) nuget.org API key,
  • passes that temporary key to dotnet nuget push.

RELEASING.md prerequisites are updated to match.

⚠️ Manual setup required before the next release

This won't publish until the nuget.org side is configured:

  1. Create a trusted publishing policy on nuget.org (username → Trusted Publishing): Repository Owner StuartMeeks, Repository NextIteration.SpectreConsole.Auth.Providers, Workflow File ci.yml. The policy owner must own all three provider packages. (Private-repo policies are provisionally active for 7 days until the first successful publish locks them in.)
  2. Add a NUGET_USER repo secret = your nuget.org profile name (username, not email).
  3. The old NUGET_API_KEY secret can be deleted once this merges.

Test plan

  • dotnet build -c Release — 0 warnings/errors
  • dotnet test -c Release — 59/59 passing
  • dotnet pack.nupkg + .snupkg produced
  • ci.yml validates as YAML
  • First tag-triggered publish after nuget.org policy + NUGET_USER are set up

Bump all package references to their latest stable versions, leaving the
intentionally capped NextIteration.SpectreConsole.Auth range untouched:

- Microsoft.Extensions.* 10.0.5 -> 10.0.9
- Spectre.Console 0.55.2 -> 0.56.0
- Microsoft.SourceLink.GitHub 8.0.0 -> 10.0.300
- Microsoft.NET.Test.Sdk 17.11.1 -> 18.6.0
- xunit 2.9.2 -> 2.9.3
- xunit.runner.visualstudio 2.8.2 -> 3.1.5
- coverlet.collector 6.0.2 -> 10.0.1

Switch the publish job to NuGet trusted publishing (OIDC): grant the job
id-token: write, exchange the GitHub OIDC token for a short-lived API key
via NuGet/login@v1 immediately before push, and drop the long-lived
NUGET_API_KEY secret in favour of a NUGET_USER profile name. Update
RELEASING.md prerequisites accordingly.

Build clean (0 warnings) and all 59 tests pass.
Adobe 0.2.2 -> 0.2.3, Airtable 0.2.2 -> 0.2.3, SoftwareOne 0.3.2 -> 0.3.3.
Patch release covering the dependency refresh and the switch to trusted
publishing. No public API or behaviour changes. CHANGELOG updated.
@StuartMeeks StuartMeeks merged commit 2e9f628 into main Jun 10, 2026
2 checks passed
@StuartMeeks StuartMeeks deleted the chore/update-deps-and-trusted-publishing branch June 10, 2026 02:31
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