# *** PUBLISH PACKAGE *** # # This workflow publishes the package to the NPM and GitHub registries. # # As a sanity check it first runs the tests on the current NodeJS LTS. # # It is triggered when a GitHub release is published. # # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages name: Publish package on: release: types: [published] jobs: build: runs-on: ubuntu-latest name: Run CI tests steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: 14 - run: npm ci - run: npm test publish: needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: 14 registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}