Skip to content

Update node versions and log level in CI #17

Update node versions and log level in CI

Update node versions and log level in CI #17

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
name: test using node ${{ matrix.node-version }}
strategy:
matrix:
node-version: [14, 16, 18, 20]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install --loglevel verbose
- run: npm test
- run: npm pack --dry-run
publish:
needs: test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm publish --loglevel verbose
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}