Skip to content

Workflow file for this run

name: Publish Package to npmjs
# Trigger this workflow when a release is published
on:
release:
types: [published]
jobs:
build:
# Specify the runner environment
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository's code
- name: Check out repository
uses: actions/checkout@v4
# Step 2: Set up Node.js environment
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x' # Specify the Node.js version
registry-url: 'https://registry.npmjs.org'
# Step 3: Install dependencies using npm ci
- name: Install dependencies
run: npm ci
# Step 4: Publish the package to npm
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}