New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@amanda-mitchell/semantic-release-npm-multiple

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amanda-mitchell/semantic-release-npm-multiple

A semantic release plugin to publish an NPM package to multiple registries.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3K
increased by33.26%
Maintainers
1
Weekly downloads
 
Created
Source

@amanda-mitchell/semantic-release-npm-multiple

This library is a Semantic Release plugin that supports publishing an NPM package to multiple registries. It supports all of the same configuration options as @semantic-release/npm, which it uses under the hood.

Installation

yarn add --dev @amanda-mitchell/semantic-release-npm-multiple

Usage

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

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    [
      "@semantic-release/npm",
      {
        "first": {
          "npmPublish": true
        },
        "second": {
          "npmPublish": true
        }
      }
    ]
  ]
}

Configuration

Each of the top-level keys refers to a specific registry that should be used and may be any value that is meaningful to you. The object associated with that key is a set of options that should be passed to the @semantic-release/npm plugin when calling it.

@semantic-release/npm also looks at a number of environment variables for its configuration:

  • NPM_TOKEN
  • NPM_USERNAME
  • NPM_PASSWORD
  • NPM_EMAIL
  • NPM_CONFIG_REGISTRY

For any of these variables, if you define a {TOP_LEVEL_KEY}_{VARIABLE} environment variable, it will be used instead.

For example, if you wanted to publish a package to both a GitHub private registry and the public NPM registry, you would first create a configuration file like this:

  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    [
      "@semantic-release/npm",
      {
        "github": {},
        "public": {}
      }
    ]
  ]
}

And then, when running semantic-release, set these environment variables:

  • GITHUB_NPM_CONFIG_REGISTRY=https://npm.pkg.github.com/
  • GITHUB_NPM_TOKEN=XXXXX
  • PUBLIC_NPM_CONFIG_REGISTRY=https://registry.npmjs.org
  • PUBLIC_NPM_TOKEN=XXXXX

FAQs

Package last updated on 11 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc