Skip to content

ci: add npm publish workflow triggered on version tags #4

ci: add npm publish workflow triggered on version tags

ci: add npm publish workflow triggered on version tags #4

Workflow file for this run

name: Publish to npm
on:
push:
tags:
- "v*"
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.28.2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Verify (lint, typecheck, build, test)
run: |
pnpm lint
pnpm typecheck
pnpm build
pnpm test
- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}