Skip to content

Workflow file for this run

name: Release & publish to npmjs
on:
release:
types: [published]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org/'
node-version-file: '.nvmrc'
- run: npm ci
- name: Build the project
run: npm run build
- name: Build for browser
run: npm run build:browser
- name: Run tests
run: npm test
- name: Publish to npm
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}