name: bump

on:
  schedule:
    - cron: "0 22 * * 1-5" # every weekday at 22:00 UTC
  workflow_dispatch:
    inputs:
      force:
        description: "force"
        required: false
        type: choice
        default: "true"
        options:
          - "true"
          - "false"

concurrency:
  group: release

permissions:
  contents: read
  id-token: write

jobs:
  bump:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: spotdemo4/nix-init@5fe5a93e1ff2a6a4cfba1ae7d3f30d0dfed9d1a9 # v1.34.1
        with:
          app_id: ${{ vars.CLIENT_ID }}
          app_key: ${{ secrets.PRIVATE_KEY }}
          fetch_depth: 0
          shell: bump

      - name: Bump
        run: bumper
        env:
          FORCE: ${{ inputs.force }}
