Skip to content

Publish NPM Packages #7

Publish NPM Packages

Publish NPM Packages #7

Workflow file for this run

name: Publish NPM Packages
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
name: Build, Test & Publish to NPM
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build all packages
run: pnpm -r build
- name: Run tests
run: pnpm -r test
- name: Publish all packages to NPM
run: pnpm -r publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}