Skip to content

Publish Package

Publish Package #3

Workflow file for this run

name: Publish Package
on:
push:
tags:
- 'v*' # This triggers the workflow only when a tag starting with 'v' (like 'v1.0.0') is pushed
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org/'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Publish to npm
run: |
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}