Skip to content

0.3.2

0.3.2 #87

name: Publish to npm registry
on:
push:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
NODE_VERSION: "lts/*"
# Sets permissions for GitHub Pages deployment
permissions:
contents: read
pages: write
id-token: write
jobs:
npm-publish:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test
- name: Build library
run: npm run build-lib
- name: Publish to NPM
run: npm publish --access public --verbose
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}