npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ifaxity/semantic-release-nuget

v2.0.2

Published

A semantic-release plugin for packing and publishing NuGet packages.

Downloads

8

Readme

@ifaxity/semantic-release-nuget

semantic-release plugin to package and publish a package via NuGet using the dotnet-cli.

Codacy grade npm (scoped) npm bundle size (scoped) npm bundle size (scoped)

| Step | Description | |--------------------|---------------------------------------------------------------------------------------| | verifyConditions | Verify that the dotnet-cli is installed and prints its nuget version. | | prepare | Executes dotnet pack which creates a nupkg file from the targeted project. | | publish | Executes dotnet nuget push which publishes nupkg files to a specified NuGet server. |

Install

$ npm i --save-dev @ifaxity/semantic-release-nuget

Usage

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

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@ifaxity/semantic-release-dotnet",
    ["@ifaxity/semantic-release-nuget", {
      "apiKey": "abc...",
      "source": "https://api.nuget.org/v3/index.json"
    }]
  ]
}

With this example:

  • The project will be built and versioned by the plugin @ifaxity/semantic-release-dotnet
  • The package will be prepared by @ifaxity/semantic-release-nuget
  • The package will be published by @ifaxity/semantic-release-nuget

Note: it's recommended to include @ifaxity/semantic-release-dotnet directly before this plugin or some other custom way.

Configuration

Nuget registry authentication

The Nuget authentication configuration is required and can be set via environment variables or via options.

Notes:

  • Both source and apiKey is required. Either implicitly from environment variables or explicitly in the configuration.

Environment variables

| Variable | Description | |----------------------|----------------------------------------------------------------------------------------------| | NUGET_API_KEY | Nuget API Key, (to create one for nuget.org go to https://www.nuget.org/account/apikeys). | | NUGET_SOURCE | Nuget source url (for nuget.org this is https://api.nuget.org/v3/index.json). | | NUGET_ASSET | Asset to push to Nuget, supports glob patterns so *.nupkg publishes all the packages in cwd. | | PACK_PROJECT | Project to pack, should be an absolute reference to a csproj file or a directory. | | PACK_CONFIGURATION | Sets the configuration when building the project (only works if option build: true is set). | | PACK_OUTPUT | Sets the output directory of the nuget pack command. Defaults to cwd. |

Options

project

The project or solution to pack. It's either a path to a csproj, vbproj, or fsproj file, or to a solution file or directory. If not specified, the command searches the current directory for a project or solution file.

configuration

Defines the build configuration. The default for most projects is Debug, but you can override the build configuration settings in your project.

build

Doesn't build the project before packing. It also implicitly sets the --no-restore flag.

output

Places the built packages in the directory specified.

includeSource

Includes the debug symbols NuGet packages in addition to the regular NuGet packages in the output directory. The sources files are included in the src folder within the symbols package.

includeSymbols

Includes the debug symbols NuGet packages in addition to the regular NuGet packages in the output directory.

dependencies

Ignores project-to-project references and only restores the root project.

properties

MSBuild properties to override when packaging the project. See the MSBuild properties reference for a list of properties that can be set.

restore

Doesn't execute an implicit restore when running the command.

force

Forces all dependencies to be resolved even if the last restore was successful. Specifying this flag is the same as deleting the project.assets.json file.

runtime

Specifies the target runtime to restore packages for. For a list of Runtime Identifiers (RIDs), see the RID catalog.

packArguments

Generic pack arguments to send, can be used if there is a specific option that needs to be configured that is not in the config above.

asset

Specifies the file path to the package to be pushed.

apiKey

The API key for the server. If not explicitly set, the value from the environment variable NUGET_API_KEY is used instead.

source

Specifies the server URL. NuGet identifies a UNC or local folder source and simply copies the file there instead of pushing it using HTTP. If not explicitly set, the value from the environment variable NUGET_SOURCE is used instead.

skipDuplicate

When pushing multiple packages to an HTTP(S) server, treats any 409 Conflict response as a warning so that other pushes can continue.

timeout

Specifies the timeout for pushing to a server in seconds. Defaults to 300 seconds (5 minutes). Specifying 0 applies the default value.

pushArguments

Generic push arguments to send, can be used if there is a specific option that needs to be configured that is not in the config above.

License

MIT