Skip to content

3.1.6

3.1.6 #35

Workflow file for this run

---
name: "NPM Publish"
on:
release:
types:
- published
workflow_dispatch:
jobs:
npm-publish:
name: "Publish package to NPM"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node
uses: actions/[email protected]
with:
node-version: "14"
- name: Publish to npm
if: github.ref != 'refs/heads/dev' && github.ref != 'refs/heads/v2.x'
uses: JS-DevTools/[email protected]
with:
token: ${{ secrets.NPM_TOKEN }}
- name: Publish to npm (dev branch)
if: github.ref == 'refs/heads/dev'
uses: JS-DevTools/[email protected]
with:
token: ${{ secrets.NPM_TOKEN }}
tag: "next"
- name: Publish to npm (v2.x branch)
if: github.ref == 'refs/heads/v2.x'
uses: JS-DevTools/[email protected]
with:
token: ${{ secrets.NPM_TOKEN }}
tag: "previous"