f2calv/.NET Build/Test/Pack/Push

Performs steps required to push a versioned NuGet package to the official NuGet and/or GitHub packages feeds.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Apr 1, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: f2calv/gha-dotnet-nuget@13be5c8e9cffbfdb204bdfc4c229b0bd96ef4077 # v2.1.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
checkoutCheckout the current repository?true
versionNuGet package version e.g. 1.2.301-feature-my-feature.12yes
GITHUB_TOKENGitHub token to push to GitHub packages e.g. secrets.GITHUB_TOKEN
NUGET_API_KEYNuGet API key to push to nuget.org feed e.g. secrets.NUGET_API_KEY
configuration.NET Configuration e.g. Debug or ReleaseRelease
solution-nameSpecify exactly which .NET solution or project to build when multiple exist. e.g. MySolution.sln or MyProject.csproj""
pushShould we push packages?true
push-previewPush a pre-release NuGet package from a non-default branch? The version's SemVer pre-release suffix (e.g. 1.2.3-my-feature.4) signals preview status to NuGet.false
execute-testsExecute unit tests. Default is 'true'true
code-coverageExecute code coverage tools. Default is 'true'true
dotnet-restore-argsOptional 'dotnet restore' arguments.""
dotnet-build-argsOptional 'dotnet build' arguments.""
dotnet-test-argsOptional 'dotnet test' arguments.""
dotnet-pack-argsOptional 'dotnet pack' arguments.""
dotnet-push-argsOptional 'dotnet push' arguments.""
package-filterComma-separated list of package ID prefixes to push e.g. 'CasCap.Common.Caching,CasCap.Common.Extensions'. When empty all packages are pushed.""
namedescription
configuration.NET Configuration e.g. Debug or Release