on:
  workflow_dispatch:

permissions:
  contents: write
  pull-requests: write

name: Create Release

jobs:
  release-please:
    runs-on: ubuntu-latest
    steps:
      - uses: release-please-oss/release-please-action@v5.0.0
        if: github.ref == 'refs/heads/main'
        id: release-main
        with:
          token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
          config-file: release/release-please-config.json
          manifest-file: release/.release-please-manifest.json
      - uses: release-please-oss/release-please-action@v5.0.0
        if: github.ref == 'refs/heads/dev'
        id: release-dev
        with:
          token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
          config-file: release/release-please-config-prerelease.json
          manifest-file: release/.release-please-dev-prerelease-manifest.json
