Skip to content

Publish to npm

Publish to npm #4

Workflow file for this run

name: Publish to npm
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org/'
always-auth: true
- name: Install dependencies
run: yarn
- name: Build package
run: yarn build # Remove or adjust if your package doesn't need building
- name: Publish package
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}