Skip to content

GitHub Action for publishing NPM package #3

GitHub Action for publishing NPM package

GitHub Action for publishing NPM package #3

# Publish npm package
# see https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish NPM Package
on:
# runs when creating a version tag
push:
tags:
- "v[0-9\\.]*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
# TODO: enable unit tests
# - run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}