name: Node.js Package on: release: types: [created] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Setup Node uses: actions/setup-node@v2 with: node-version: 12 - name: Install run: npm ci - name: Production Build run: npm run build:prod - name: Lint run: npm run lint - name: Production Tests & Coverage run: | npm run test:prod npm run coverage env: CI: true publish-npm: needs: build runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Setup Node uses: actions/setup-node@v2 with: node-version: 12 registry-url: https://registry.npmjs.org/ - name: Install run: npm ci - name: Publish run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.npm_token}}