# This workflow will bump the patch version in package.json and push the change to the repository.

name: Manual Version Bump

on:
  workflow_dispatch:

jobs:
  bump-version:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: actions/setup-node@v4
        with:
          node-version: '20.x'

      - run: npm ci
      - name: Configure Git
        run: |
          git config user.name "github-actions[bot]"
          git config user.email "github-actions[bot]@users.noreply.github.com"

      - name: Bump version and push to repo
        run: |
          npm version patch -m "chore: release %s"
          git push --follow-tags
