Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

codefresh-contrib/npm-publish

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codefresh npm-publish Plugin

The release-to-npm can be used to publish images to npm.

Usage

Set required and optional environment variable and add the following step to your Codefresh pipeline:

---
version: '1.0'

steps:

  ...

     deploy_to_npm:  
      title: Publishing To Npm 
      image: codefresh/npm-publish
      commands:
  ...

Environment Variables

  • required NPM_TOKEN - token of npm account

How to use

  • Add as a dependency to your project npm install --save-dev publish-for-npm

  • Login into your project's NPM registry

npm login --registry <registry url>
npm login --registry http://registry.npmjs.org
  • Copy the token

see how to extracting the NPM_TOKEN https://docs.npmjs.com/private-modules/ci-server-config#getting-an-authentication-token

  • Set the token as environment variable

  • Add script command

Create a script command to run the npm-publish, in your package.json

{
    "scripts": {
        "npm-publish": "npm-publish"
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 87.5%
  • Dockerfile 12.5%