Skip to content
name: publish-package-npm
on:
push:
tags:
- 'v*'
jobs:
publish:
name: Build and Publish to NPM
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure .npmrc
uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Perform basic audit
run: npm audit --audit-level low
- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}