Skip to content

ci: test on .NET 10 and .NET 11; publish to NuGet with trusted publishing - #1

Merged
kamronbatman merged 1 commit into
mainfrom
chore/net11
Nov 11, 2026
Merged

kamronbatman merged 1 commit into
mainfrom
chore/net11

Conversation

@kamronbatman

@kamronbatman kamronbatman commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

  • The tests target net10.0;net11.0 (previously net8.0). A new Build and Test workflow runs them on pull requests and on main, with both SDKs installed.
  • The expected generator output in the test uses ReplaceLineEndings(). Replace("\n", Environment.NewLine) turned the \r\n of a CRLF checkout into \r\r\n, so the test failed on Windows.
  • Adds publish.yml, the same trusted-publishing workflow as the other package repos: manual dispatch from main, the nuget environment, a NuGet OIDC login, and --skip-duplicate.
  • The generator and annotations stay netstandard2.0 and keep their versions (1.0.3.2 / 1.0.0). Nothing in the packages changes, so a publish now is a no-op until the next version bump.

Before the first publish

  • Add a trusted publishing policy on nuget.org for modernuo/CodeGeneratedEvents, workflow publish.yml, environment nuget, owning both ModernUO.CodeGeneratedEvents.* packages.
  • Make sure the NUGET_USER org secret is available to this repository.

Testing

  • Locally on Windows, dotnet test -c Release: passes on net10.0 and net11.0.
  • Packing both projects from a clean tree with -p:GeneratePackageOnBuild=false gives the same layout as the published 1.0.0 / 1.0.3.2 packages.

…hing

The tests target net10.0 and net11.0, and a Build and Test workflow runs
them on pull requests and on main. The expected generator output now
uses ReplaceLineEndings(), so the test passes on a CRLF checkout
instead of doubling the carriage return.

The publish workflow is the trusted publishing setup the other package
repos use: manual dispatch from main, the nuget environment, an OIDC
login, and --skip-duplicate. The generator and annotations stay
netstandard2.0 and keep their versions; nothing in the packages
changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kamronbatman
kamronbatman merged commit 1f0eb26 into main Nov 11, 2026
1 check passed
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