Skip to content

Publish NPM Package

Publish NPM Package #1

Workflow file for this run

name: Publish NPM Package
on:
workflow_dispatch:
workflow_run:
workflows: [Release]
types:
- completed
release:
types: [released]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm run build
- run: npm run test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm run build
- run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}