Skip to content

release

release #2

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
increment:
description: 'Tipo de incremento: patch, minor, major ou pre*'
required: true
default: 'patch'
options:
- patch
- minor
- major
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PERSONAL_TOKEN }}
- name: Setup GIT
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 18.x
- name: Get npm cache directory
id: npm-cache
run: |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- name: Setup npm cache
uses: actions/cache@v3
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci || npm install
- name: Release
run: 'npx release-it --increment ${{ github.event.inputs.increment }}'