name: "nuget-trusted-publishing" description: "Publishing HermesNET NuGet releases through GitHub Releases and OIDC trusted publishing" domain: "release-management" confidence: "high" source: "earned — v0.1.0 release preparation"
Context
Use this pattern when shipping HermesNET packages to nuget.org. The release version is centralized, and the publish workflow derives the package version from the GitHub Release tag or a workflow override.
Patterns
- Keep the package version in
Directory.Build.props. - Use
publish.ymlwithNuGet/login@v1and thereleaseenvironment. - Publish all packable outputs together:
Hermes.Core,Hermes.Adapters, andhermesnet. - Keep
Hermes.Hostnon-packable.
Examples
- Tag the release
v0.1.0to publish version0.1.0. - Use
workflow_dispatchwithversion=0.1.0when manually overriding the release version.
Anti-Patterns
- Do not add a long-lived NuGet API key to the repo.
- Do not publish packable projects independently.
- Do not duplicate the version in multiple project files.