Skip to content

v5.0.0

v5.0.0 #17

Workflow file for this run

name: Publish NPM package
on:
release:
types: [published]
jobs:
publish:
name: Push NPM package to npmjs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 18.x
registry-url: 'https://registry.npmjs.org'
- name: Build
run: |
npm ci
npm run build
- name: Publish
if: '!github.event.release.prerelease'
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish PRERELEASE
if: 'github.event.release.prerelease'
run: npm publish --access public --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}