Skip to content

chore: release v2.2.6 #114

chore: release v2.2.6

chore: release v2.2.6 #114

name: Continuous Delivery
on:
workflow_dispatch:
inputs:
version:
description: 'what version to release'
required: true
type: string
dry:
description: 'Dry run'
required: false
type: boolean
push:
branches:
- main
jobs:
publish:
name: Publish to NPM
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
ref: ${{ 'main' }}
token: ${{secrets.GH_TOKEN}}
- name: Use Node.js v22
uses: josh-development/.github/setup-node@main
with:
version: 22
- name: Build
run: yarn build
- name: Setup Git
run: |
git config --global user.name 'DanCodes'
git config --global user.email '[email protected]'
- name: Bump Version & Publish
if: ${{ inputs.dry }}
run: yarn release-it --ci -i ${{ inputs.version }} -d
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Set Version & Publish
if: ${{ !inputs.dry && github.event_name == 'workflow_dispatch' }}
run: |
yarn release-it --ci -i ${{ inputs.version }}
git push
- name: Bump Version & Publish
if: ${{ !inputs.dry && github.event_name == 'push' }}
run: |
yarn release-it --ci
git push
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}