Skip to content

Adopt CPM, update packages, switch to NuGet trusted publishing#5

Merged
StuartMeeks merged 1 commit into
mainfrom
chore/cpm-trusted-publishing-package-updates
Jun 10, 2026
Merged

Adopt CPM, update packages, switch to NuGet trusted publishing#5
StuartMeeks merged 1 commit into
mainfrom
chore/cpm-trusted-publishing-package-updates

Conversation

@StuartMeeks

Copy link
Copy Markdown
Owner

Summary

Three related housekeeping changes:

1. Central Package Management (CPM)

  • New Directory.Packages.props at the repo root with ManagePackageVersionsCentrally and a PackageVersion entry per package.
  • Version= attributes removed from both project files; asset metadata (PrivateAssets, IncludeAssets) left intact.

2. Package updates → latest stable (no prerelease)

Package From To
Microsoft.Extensions.DependencyInjection.Abstractions 10.0.5 10.0.9
Microsoft.SourceLink.GitHub 8.0.0 10.0.300
Spectre.Console 0.55.2 0.56.0
Microsoft.Extensions.DependencyInjection 10.0.5 10.0.9
Microsoft.NET.Test.Sdk 17.11.1 18.6.0
Spectre.Console.Testing 0.55.0 0.56.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

Spectre.Console.Cli stays at 0.55.0 — that is its latest stable (no 0.56.0 exists) and it only requires Spectre.Console >= 0.55.0, which 0.56.0 satisfies.

3. NuGet Trusted Publishing

  • publish job now requests a short-lived API key via NuGet/login@v1 (with id-token: write) and pushes with it, replacing the long-lived NUGET_API_KEY secret. Trusted publishing policy is already configured on nuget.org.

Verification

  • dotnet build -c Release → 0 warnings (with TreatWarningsAsErrors)
  • dotnet test -c Release → 32/32 passing

🤖 Generated with Claude Code

- Move all package versions to a central Directory.Packages.props
  (ManagePackageVersionsCentrally) and strip Version attributes from
  the project files.
- Update NuGet references to latest stable: Spectre.Console 0.56.0,
  Microsoft.Extensions.DependencyInjection(.Abstractions) 10.0.9,
  Microsoft.SourceLink.GitHub 10.0.300, Microsoft.NET.Test.Sdk 18.6.0,
  xunit 2.9.3, xunit.runner.visualstudio 3.1.5, coverlet.collector 10.0.1,
  Spectre.Console.Testing 0.56.0. Spectre.Console.Cli stays at 0.55.0
  (latest stable; it only requires Spectre.Console >= 0.55.0).
- Switch the publish job from a long-lived NUGET_API_KEY secret to NuGet
  Trusted Publishing: request a short-lived key via NuGet/login@v1 with
  id-token: write, then push with that key.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@StuartMeeks StuartMeeks merged commit 35b9454 into main Jun 10, 2026
3 checks passed
@StuartMeeks StuartMeeks deleted the chore/cpm-trusted-publishing-package-updates branch June 10, 2026 02:57
@StuartMeeks StuartMeeks mentioned this pull request Jun 10, 2026
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