Skip to content

Create npm-publish.yml #3

Create npm-publish.yml

Create npm-publish.yml #3

name: Node.js Package
on:
push:
branches:
- main
release:
types: [created]
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- name: Publish to npm
if: github.event_name == 'release'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}