name: Release notes

on:
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  release-notes:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Check release notes
        if: startsWith(github.head_ref, 'release/') == false
        uses: actualbudget/actions/release-notes/check@main
      - name: Generate release notes
        if: startsWith(github.head_ref, 'release/') == true
        uses: actualbudget/actions/release-notes/generate@main
