Skip to content

release major

release major #9

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
dry:
type: boolean
description: Dry-mode (simulate publish)?
default: true
required: true
version:
type: choice
description: Select version to release
options:
- major
- minor
- patch
- auto
default: auto
required: true
run-name: release ${{ github.event.inputs.version }}${{ github.event.inputs.dry == 'true' && ' (--dry-run)' || '' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set node v20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
registry-url: https://registry.npmjs.org/
- name: Set npm version
run: npm i -g npm@8
- name: Install dependencies
run: npm ci
- name: Build source code
run: npm run build
- name: Setup Git config
run: |
git config --global user.name 'Devo GitHub Action'
git config --global user.email '[email protected]'
- name: Publish ${{ github.event.inputs.version }}${{ github.event.inputs.dry == 'true' && ' (--dry-run)' || '' }}
run: npm run release:ci -- ${{ github.event.inputs.version != 'auto' && github.event.inputs.version || '' }}${{ github.event.inputs.dry == 'true' && ' --dry-run' || '' }}