Skip to content

Release

Release #24

Workflow file for this run

name: Release
on:
workflow_run:
workflows: ['CI']
types: [completed]
branches: [master, beta]
workflow_dispatch:
inputs:
dryRun:
description: 'Dry run'
required: false
type: boolean
jobs:
semantic-release:
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: 'package.json'
cache: 'npm'
- run: npm ci
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
with:
extra_plugins: |
@semantic-release/changelog
dry_run: ${{ github.event.inputs.dryRun }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'CI failed, skipping release'