Skip to content

Added new workflow feature #2

Added new workflow feature

Added new workflow feature #2

Workflow file for this run

name: Publish NPM Package
on:
push:
tags:
- 'v*' # Only trigger on version tags like v1.0.0
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
- name: Install dependencies
run: npm install
- name: Build package (optional)
run: npm run build
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish