Skip to content

publish to npm

publish to npm #4

Workflow file for this run

name: publish to npm
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: setup node
uses: actions/setup-node@v3
with:
node-version: "18"
registry-url: "https://registry.npmjs.org"
- name: clone repo
uses: actions/checkout@v3
with:
ref: "npm"
- name: install dependencies
run: npm ci
- name: publish
run: |
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > .npmrc
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}