Skip to content

build: target .NET 10/11, xunit.v3 and NuGet trusted publishing - #2

Merged
NotOfficer merged 5 commits into
masterfrom
build/net10-net11-trusted-publishing
Nov 13, 2026
Merged

NotOfficer merged 5 commits into
masterfrom
build/net10-net11-trusted-publishing

Conversation

@NotOfficer

Copy link
Copy Markdown
Owner

Prepares the build for v3. The library code stays unchanged apart from removing the NET9_0_OR_GREATER conditionals.

  • Targets: net10.0;net11.0. net8.0 and net9.0 are dropped, which is a breaking change for consumers on those runtimes. With every target supporting allows ref struct, the conditionals around GenericSpanReader and the test helpers are gone.
  • Tests: xunit.v3 on Microsoft.Testing.Platform. src/global.json selects the runner, and the package order matches the Utils repo.
  • CI:
    • The publish job uses NuGet trusted publishing (NuGet/login, account Fortnite-API) instead of the removed NUGET_API_KEY secret.
    • Publishing is a separate job, so restore, build and tests never get id-token: write.
    • Pull requests run the new Test workflow instead of the full publish workflow.
  • Repo: .gitattributes with * text=auto, so CRLF checkouts no longer show every file as modified. The copyright year is now 2026.

The version stays at 2.3.0 on purpose. The push to master after the merge runs the new publish job once, including the NuGet login, but --skip-duplicate skips the push because 2.3.0 already exists. This checks trusted publishing without releasing anything.

Validation, run locally on this branch the way CI runs it:

  • dotnet build -c Release: 0 warnings, 0 errors.
  • dotnet test: 8 of 8 passed (4 per target).
  • dotnet pack: produced GenericReader.2.3.0.nupkg and .snupkg.

🤖 Generated by Opus 5.5 with Claude Code in T3 Code

NotOfficer and others added 5 commits November 13, 2026 02:19
Without it, a checkout with CRLF line endings showed every file as
modified. Text files are now stored with LF and checked out with the
platform's line ending.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
.NET 8 and 9 are no longer targeted. Since every target now has
`allows ref struct`, the NET9_0_OR_GREATER conditionals are gone and
GenericSpanReader is always compiled.

BREAKING CHANGE: the package no longer contains net8.0 and net9.0
builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces xunit 2 with xunit.v3 and updates the remaining test packages.
global.json selects Microsoft.Testing.Platform as the dotnet test
runner, and the package references follow the order used in Utils.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The publish job now exchanges a GitHub OIDC token for a short-lived
NuGet API key instead of using the NUGET_API_KEY secret. It runs in its
own job, so restore, build and tests never get the id-token permission.
Pull requests run build and tests in a separate Test workflow, and both
workflows install the .NET 10 and 11 SDKs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NotOfficer
NotOfficer merged commit 5aca945 into master Nov 13, 2026
1 check passed
@NotOfficer
NotOfficer deleted the build/net10-net11-trusted-publishing branch November 13, 2026 01:22
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