- NuGet API key with push permissions.
dotnetSDK 8.x.
- Update package version in
src/OwnershipGuard/OwnershipGuard.csproj(<Version>). - Run validation:
dotnet restore OwnershipGuard.sln
dotnet test OwnershipGuard.sln -c Release
dotnet pack -c Release src/OwnershipGuard/OwnershipGuard.csproj -o artifacts- Push package and symbols:
dotnet nuget push "artifacts/*.nupkg" --api-key "<NUGET_API_KEY>" --source "https://api.nuget.org/v3/index.json" --skip-duplicate
dotnet nuget push "artifacts/*.snupkg" --api-key "<NUGET_API_KEY>" --source "https://api.nuget.org/v3/index.json" --skip-duplicateWorkflow: .github/workflows/release-nuget.yml
- Trigger on tag
v*(for example:v0.1.1) or manually viaworkflow_dispatch. - Required secret:
NUGET_API_KEY. - Workflow validates that tag version matches
<Version>insrc/OwnershipGuard/OwnershipGuard.csproj.