Repository navigation
Modernize GitHub workflows and finish NuGet trusted publishing - #7
Merged
Merged
Conversation
- Target net11.0 - Ardalis.GuardClauses 6.0.0, Ardalis.Specification 10.0.0, Mediator 3.0.2 - Test packages: Microsoft.NET.Test.Sdk 18.12.0, coverlet.collector 10.1.1, AwesomeAssertions 9.6.0, Moq 4.21.0, xunit 2.9.3, xunit.runner.visualstudio 4.0.1 - Remove Microsoft.Extensions.Logging.Abstractions reference (NU1510: provided by net11.0) - CI/publish workflows: .NET 11 SDK, actions/checkout v7, actions/setup-dotnet v6 - Bump package version to 4.0.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ci.yml: broaden path filters, least-privilege permissions, concurrency, locked-mode restore with NuGet caching, TRX + coverage artifacts, pack and upload the nupkg, callable via workflow_call - publish.yml: reuse ci.yml, push the CI-built package; OIDC login and push only run for tag refs, with id-token: write scoped to that job - Pin all actions to commit SHAs (NuGet/login v1.2.0) - Add Dependabot for github-actions and nuget - Enable NuGet lock files Refs #6 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 of 4 tasks
- ci.yml: --report-xunit-trx and --coverlet replace VSTest --logger/--collect - Watch global.json in CI path filters - Dependabot test group: Microsoft.Testing.* instead of Microsoft.NET.Test.Sdk Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6. Stacked on #9 (xunit v3). The base is
xunit-v3-main; retarget tomainonce #9 merges.Summary
Trusted publishing (
publish.yml)ci.ymlas a reusable workflow, then pushes the exact.nupkgthat CI built and tested. Build, test and pack steps are no longer duplicated.NuGet/login(OIDC → short-lived API key) anddotnet nuget pushare in a separatepublishjob that runs only for tag refs. A manualworkflow_dispatchon a branch now only builds and tests.id-token: writeis granted only to the publish job; the workflow default iscontents: read.NuGet/loginis pinned to v1.2.0 (by SHA). Push uses--skip-duplicate.CI (
ci.yml)tests/**,Directory.*.props,*.slnx,nuget.configand.github/workflows/**(before, onlysrc/**triggered it).permissions: contents: read, plusconcurrencyso a new push cancels older PR runs.RestorePackagesWithLockFile). CI restores with--locked-modeand caches packages throughsetup-dotnet.--report-xunit-trx) and Cobertura coverage (--coverlet, Microsoft.Testing.Platform flags) as thetest-resultsartifact, and the package (nuget-packageartifact).workflow_call).Other
.github/dependabot.ymlgives weekly, grouped updates forgithub-actionsandnuget.Manual steps (need a maintainer)
NimblePros.SharedKernelwith ownerNimblePros, repositorySharedKernelSample, workflow filepublish.yml, and no environment.NUGET_USERsecret is the nuget.org username (profile name) of the policy owner.NUGET_API_KEYrepo secret and revoke that key on nuget.org. Nothing references it any more.nugetenvironment with required reviewers. Then addenvironment: nugetto the publish job and set the same environment on the policy.Test plan
actionlintpasses on all workflowsNimblePros.SharedKernel.4.0.0.nupkgis produced.🤖 Generated with Claude Code