name: Release - prepare bump for main branch

on:
  workflow_dispatch:

permissions:
  contents: write
  pull-requests: write

jobs:
  build:
    name: run
    runs-on: ubuntu-latest
    if: github.repository == 'discourse/discourse'
    container: discourse/discourse_test:slim
    timeout-minutes: 10

    env:
      GH_TOKEN: ${{ github.token }}

    steps:
      - uses: actions/checkout@v6
        with:
          filter: tree:0
          fetch-depth: 0

      - uses: ./.github/actions/setup-release-environment

      - name: Create a PR for the next version bump
        run: bin/rake release:prepare_next_version
