Skip to content

Node.js Publish

Node.js Publish #1

Workflow file for this run

name: Node.js Publish
on:
release:
types: [created]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 16
- uses: pnpm/action-setup@v2
with:
version: 8
- run: pnpm install -f
- run: pnpm install @types/node
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc
env:
NPM_TOKEN: ${{secrets.npm_token}}
- run: pnpm run build && npm publish
env:
NPM_TOKEN: ${{secrets.npm_token}}