@octorelease/npm
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

NPM plugin

Octorelease plugin to perform actions related to NPM.

Build Status npm latest version

Step Description
init Load version numbers from package.json and login to NPM registry.
version Bump the package version with npm CLI.
publish Publish the new package version to NPM registry.
success Verify that new package version can be installed successfully.

Install

$ npm install @octorelease/npm -D

Usage

The plugin can be configured in the Octorelease configuration file:

{
  "plugins": [
    "@octorelease/npm"
  ]
}

Configuration

Environment variables

Variable Description
NPM_TOKEN Access token of the NPM publisher.
NPM_USERNAME User name of the NPM publisher.
NPM_PASSWORD Password of the NPM publisher.
NPM_EMAIL Email address of the NPM publisher.

Use either NPM_TOKEN for token authentication or NPM_USERNAME, NPM_PASSWORD, and NPM_EMAIL for legacy authentication.

Options

Options Description Default
aliasTags Key-value pairs of package tags that should be mirrored (see example below). {}
npmPublish Specify false to skip publishing to the NPM registry. true
pruneShrinkwrap Specify true to prune dev and extraneous dependencies from npm-shrinkwrap.json. false
smokeTest Specify true to test installing the package from the NPM registry after it is published. false
tarballDir Path to directory where package tarball (TGZ) should be generated, or false to skip creating a tarball. false

Examples

To mirror the @latest tag to @lts:

{
  "plugins": [
    ["@octorelease/npm", {
      "aliasTags": {
        "latest": "lts"
      }
    }]
  ]
}

To skip publishing to the NPM registry and release the package tarball with another plugin like @octorelease/github:

{
  "plugins": [
    ["@octorelease/npm", {
      "npmPublish": false,
      "tarballDir": "dist"
    }],
    ["@octorelease/github", {
      "assets": "dist/*.tgz"
    }]
  ]
}

Package Sidebar

Install

npm i @octorelease/npm

Weekly Downloads

0

Version

0.1.5

License

Apache-2.0

Unpacked Size

36.8 kB

Total Files

17

Last publish

Collaborators

  • zowe-actions-robot
  • t1m0thyj