Skip to content
name: Test and publish to npm
on:
push:
tags:
- v*
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 17.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm test
release:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v1
- name: Make stable release to npm
uses: epeli/npm-release@v1
with:
type: stable
token: ${{ secrets.NPM_TOKEN }}