Skip to content

Node.js Publish

Node.js Publish #16

Workflow file for this run

name: Node.js Publish
on:
release:
types: [published]
env:
NODE_VERSION: 18.x
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
cache: npm
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
- name: Update npm
run: npm install -g npm
- name: Install packages
run: npm ci
- name: Publish to NPM
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}