Skip to content

Publish

Publish #4

Workflow file for this run

name: Publish
on:
workflow_dispatch:
inputs:
increment:
description: 'Increment "major", "minor", "patch", or "pre*" version; or specify version [default: "patch"]'
required: true
default: 'patch'
type: string
dry-run:
description: 'Do not touch or write anything, but show the commands'
default: true
type: boolean
jobs:
release-it:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Setup
uses: actions/setup-node@v3
with:
node-version: 16
- run: |
yarn
- name: Dry Run Release
if: ${{ inputs.dry-run }}
run: |
yarn release ${{ inputs.increment }} -d --ci
- name: Release
if: ${{ !inputs.dry-run }}
run: |
git config --global user.email "${{ secrets.GIT_EMAIL }}"
git config --global user.name "${{ secrets.GIT_USERNAME }}"
yarn release ${{ inputs.increment }} --ci --plugins.@release-it/bumper.out=src/package.json