1.1.5 • Published 4 years ago

@zedtk/semantic-release-nuget v1.1.5

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
4 years ago

@zedtk/semantic-release-nuget

semantic-release plugin to publish a NuGet package.

StepDescription
verifyConditionsVerify the configuration.
prepareUpdate the .csproj version and create the NuGet package.
publishPublish the NuGet package to the registry.

Install

$ npm install @zedtk/semantic-release-nuget -D

Usage

The plugin can be configured in the semantic-release configuration file:

{
    "plugins": [
        "@semantic-release/commit-analyzer",
        "@semantic-release/release-notes-generator",
        "@zedtk/semantic-release-nuget"
    ]
}

Configuration

Environment variables

VariableDescription
NUGET_API_KEYAPI key for the NuGet registry

Options

OptionsDescriptionDefault
publishWhether to publish the NuGet package to the registry.true
projectRootDirectory path to publish..
buildConfigurationProject build configuration.Release
includeSymbolsWhether to publish a symbols package (.snupkg).true
packageDirDirectory path in which to write the the package.dist
registryRegistry name (existing NuGet source), url or path to which push the package.https://api.nuget.org/v3/index.json

Note: If publish is false the .csproj version will still be updated.

Note: The projectRoot directory must contain a .csproj. The version will be updated only in the .csproj within the projectRoot directory.

Note: The includeSymbols option allows Source Link support. Some resources to help configure your project:

Note: If you use a shareable configuration that defines one of these options you can set it to false in your semantic-release configuration in order to use the default value.

Examples

The publish and packageDir option can be used to skip the publishing to the NuGet registry and instead, release the package tarball with another plugin. For example with the @semantic-release/github plugin:

{
    "plugins": [
        "@semantic-release/commit-analyzer",
        "@semantic-release/release-notes-generator",
        [
            "@zedtk/semantic-release-nuget",
            {
                "publish": false,
                "packageDir": "dist"
            }
        ],
        [
            "@semantic-release/github",
            {
                "assets": "dist/*.nupkg"
            }
        ]
    ]
}
1.1.1

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago