Skip to content

Develop (#2)

Develop (#2) #2

Workflow file for this run

# Publish to npm - Runs on version tags
name: Publish to npm
on:
push:
tags:
- "v*.*.*"
branches:
- master
jobs:
publish:
name: Build & Publish
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
registry-url: "https://registry.npmjs.org"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint
- name: Run tests
run: npm test
- name: Build package
run: npm run build
- name: Verify package contents
run: npm pack --dry-run
- name: Publish to npm
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}