Skip to content

Publish npm package

Publish npm package #5

Workflow file for this run

name: Publish npm package
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install build dependencies
run: npm i
- name: Build TypeScript code
run: npm run build
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/
- name: Install build dependencies
run: npm i
- name: Build TypeScript code
run: npm run build-ts
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}