Skip to content

Release

Release #99

Workflow file for this run

name: Release
on:
workflow_run:
workflows: [Run tests]
types: [completed]
branches: [master]
jobs:
release:
runs-on: ubuntu-20.04
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- run: yarn install
- run: yarn build
- id: publish
name: Release to NPM
if: github.ref == 'refs/heads/master'
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
tag: beta
- name: Tag successful release
if: steps.publish.outputs.version != steps.publish.outputs.old-version
uses: rickstaa/action-create-tag@v1
with:
tag: v${{ steps.publish.outputs.version }}
message: 'Latest v${{ steps.publish.outputs.version }}'