Skip to content

v1.4.1

v1.4.1 #21

Workflow file for this run

name: Publish to NPM
on:
release:
types: [published]
workflow_dispatch:
inputs:
dry_run:
description: 'Run without actually publishing (dry run)'
required: false
default: true
type: boolean
jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build
- name: Run tests
run: npm test
- name: Run linting
run: npm run lint
- name: Run type checking
run: npm run typecheck
- name: Publish to NPM (dry run)
if: ${{ github.event.inputs.dry_run == 'true' }}
run: npm publish --dry-run --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to NPM
if: ${{ github.event.inputs.dry_run != 'true' }}
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}