Skip to content

chore: add github workflow for npm publish (#26) #3

chore: add github workflow for npm publish (#26)

chore: add github workflow for npm publish (#26) #3

Workflow file for this run

---
# Publishing the package to the npm registry when the version number changes
# See https://github.com/marketplace/actions/npm-publish for more information
name: Publish Package to npmjs
on:
push:
branches: main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20"
- run: npm ci
- run: npm run build
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
access: 'public'