Deployments NPM

NPM using Travis CI

  1. Open your Travis CI account and link your repo to the CI.

  2. Create a token from npm:
    https://www.npmjs.com/settings/{USERNAME}/tokens
    
  3. Locally on your repo folder, use the following commands to encrypt the token:
    gem install travis
    travis encrypt NPM_TOKEN="{PASTE_YOUR_TOKEN_HERE}" --add
    

    IMPORTANT! If you’re using travis-ci.com (not .org), you’ll need to login before encrypting the token.

    In order to use gem you’ll need to install Ruby. This step will create a section env > global on your .travis.yml file (or even a completely new file if you didn’t have one).

  4. You’ll need to update .travis.yml to deploy into npm. For example:

    deploy:
      provider: npm
      email: "youremail@me.com"
      api_key: $NPM_TOKEN
    

Equilaterus (CC-BY) 2018 - 2019.