Skip to content

Publish to npm

Publish to npm #2

Workflow file for this run

name: Publish to npm
on:
release:
types: [published]
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
# Check out the code from the repository
- name: Checkout code
uses: actions/checkout@v4
# Set up Node.js
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18.x"
# Install dependencies
- name: Install dependencies
run: npm i -g pnpm && pnpm install
# Build the project
- name: Build the project
run: pnpm run build
# Publish to npm
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}