Skip to content
Tak Tran edited this page Jun 2, 2019 · 1 revision

Publishing

To publish a new package to npm:

Setup

To set up CircleCI for publishing (NOTE: don't need to do this again):

  • Create a new npm auth token, and add it to the NPM_AUTH_TOKEN CircleCI environment vars
  • Provision a GitHub deploy key
    • Generate a new key on your local machine: ssh-keygen -m PEM -t rsa -C "[email protected]"

    • Add the private key to CircleCI ssh page with hostname github.com, and delete the private key

    • Get the Fingerprint generated and put it into the .circleci/config.yml build step where required:

      - add_ssh_keys:
          fingerprints:
            - "<fingerprint>"
      
    • Make sure "Pass secrets to builds from forked pull requests" is set to its default of "Off" in Advanced settings

    • Upload the public key to GitHub deploy keys, making sure to "Allow write access"

Clone this wiki locally