Skip to content

NPM Package

NPM Package #25

Workflow file for this run

name: NPM Package
on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Begin CI...
uses: actions/checkout@v2
- name: Use Node 20
uses: actions/setup-node@v1
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
- name: Use cached node_modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: nodeModules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
nodeModules-
- name: Install dependencies
run: npm install
env:
CI: true
- name: Lint
run: npm run lint
env:
CI: true
- name: Test
run: npm run test --ci --coverage --maxWorkers=2
env:
CI: true
- name: Release to NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}