Skip to content

Release (bump version, tag, publish) #1

Release (bump version, tag, publish)

Release (bump version, tag, publish) #1

Workflow file for this run

name: Release (bump version, tag, publish)
on:
workflow_dispatch:
inputs:
bump:
description: Version bump (patch/minor/major)
required: true
default: patch
type: choice
options:
- patch
- minor
- major
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
- name: Configure git identity
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Bump version and create tag
run: |
npm version "${{ inputs.bump }}" -m "chore(release): %s"
- name: Push commit and tags
run: git push --follow-tags
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true