name: umami_client_minor
permissions:
  contents: write

on:
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [20.x]

    steps:
      - name: Checkout code
        uses: actions/checkout@v6
        with:
          ref: 'npmjs'
          token: ${{ secrets.GH_ACTIONS_TOKEN }}

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v6
        with:
          node-version: ${{ matrix.node-version }}

      - name: Minor
        run: |
          git config --global user.email  'github-actions[bot]@users.noreply.github.com'
          git config --global user.name 'github-actions[bot]'
          git fetch --all
          git checkout main
          npm version minor
          git branch -f npmjs
          git push origin main npmjs --tags