Skip to content

v1.2.0

v1.2.0 #95

Workflow file for this run

name: Publish to NPM
on:
release:
types: [published]
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
- run: yarn install
- run: yarn test
- run: yarn run build
- run: echo ${{github.ref}}
- name: Release canary version
# The ref will be the tag name. Match against tags like
# "v1.0.0-canary.0".
if: ${{ contains(github.ref, '-canary.') }}
run: npm publish --tag canary
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Release latest version
# Assume non-canary is latest.
if: ${{ !contains(github.ref, '-canary.') }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}