Skip to content

Publish to NPM

Publish to NPM #2

Workflow file for this run

name: Publish to NPM
on:
workflow_dispatch:
jobs:
Publish:
name: Publish
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: checkout
uses: actions/checkout@v2
with:
ref: 'master'
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: yarn install
- name: Test
run: yarn test
- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}