actions-marketplace-validations/Publish to NuGet

Automatic project detection, multi-package support, better error detection and improved logging. Drop-in replacement for publish-nuget clones.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
NUGET_KEYNuGet API key to authenticate on the NuGet server. DO NOT PUT THE KEY DIRECTLY HERE. Use GitHub Secrets (e.g., dollarsign{{secrets.YOUR_NUGET_API_KEY}}) instead.yes
PROJECT_FILE_PATHFull path to a project file or a JSON array of project file paths. (Examples: `src/MyNuGetProject/MyNuGetProject.csproj` or `["src/Project1/Project1.csproj", "src/Project2/Project2.csproj"]`). If not specified, the action will auto-discover a project (or projects, if PUBLISH_ALL_PROJECTS is true) that contains `<GeneratePackageOnBuild>true</GeneratePackageOnBuild>`.no
PUBLISH_ALL_PROJECTSIf set to true, the action ignores PROJECT_FILE_PATH and auto-discovers and publishes all projects with `<GeneratePackageOnBuild>true</GeneratePackageOnBuild>`.nofalse
SOLUTION_FILE_PATHPath to solution to build.no""
NUGET_SOURCEURL to the NuGet server. (Default: https://api.nuget.org)nohttps://api.nuget.org
INCLUDE_SYMBOLSAdd symbols to the NuGet package. (Default: false)nofalse
TAG_COMMITTag the current Git commit upon successful upload. (This will prevent publish if the tag already exists.) (Default: false)nofalse
TAG_FORMATGit tag format. Use * as a placeholder for the version number. (Default: v*)nov*
PACKAGE_NAMENuGet package name used for checking if the package version already exists on the NuGet server. (Default: extracted from PROJECT_FILE_PATH)no
VERSION_FILE_PATHPath to the file containing the version number to extract using regex. (Default: same as PROJECT_FILE_PATH)no
VERSION_REGEXRegex pattern with a capturing group to extract version info. (Default: ^\s*<Version>\s*(.*?)\s*<\/Version>\s*$)no^\s*<Version>\s*(.*?)\s*<\/Version>\s*$
VERSION_STATICProvide a static version instead of extracting from a file. Overrides VERSION_FILE_PATH and VERSION_REGEX. (e.g., dollarsign{{env.GitBuildVersionSimple}})no
REBUILD_PROJECTRebuild the project in release mode before packaging. (Default: true)notrue
LOG_LEVELLog level for debugging (DEBUG, INFO, WARN). (Default: DEBUG)noDEBUG
namedescription
VERSIONVersion of the associated git tag (if TAG_COMMIT is true).
PACKAGE_NAMEName of the generated NuGet package.
PACKAGE_PATHPath to the generated NuGet package.
SYMBOLS_PACKAGE_NAMEName of the generated symbols package (if INCLUDE_SYMBOLS is true).
SYMBOLS_PACKAGE_PATHPath to the generated symbols package (if INCLUDE_SYMBOLS is true).