Skip to content

Publish to NPM Registry #5

Publish to NPM Registry

Publish to NPM Registry #5

Workflow file for this run

name: Publish to NPM Registry
on:
workflow_dispatch:
push:
tags:
- v*
jobs:
build:
name: Build Node.js package
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
environment: release
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{github.ref_name}}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Build package
run: |
npm ci
npm run build
- name: Publish package
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}