Skip to content

npm publish

npm publish #16

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: npm publish
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "19"
registry-url: "https://registry.npmjs.org/"
- name: Authenticate to npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPMTOKEN }}" > ~/.npmrc
- name: Install dependencies
run: npm install
- name: Build package
run: npm run build
- name: Publish package
run: npm publish --access public