name: Create GitHub release in IG repo after publish PR merge

on:
  pull_request:
    types: [closed]
    branches: [main]

permissions:
  contents: read
  pull-requests: read
  
jobs:
  release-note-on-merge:
    uses: medcomdk/fhir-publishing/.github/workflows/create-release-note-on-merge.yaml@main
    with:
      FHIR_PUBLICATION_BOT_APP_ID:   ${{ vars.FHIR_PUBLICATION_BOT_APP_ID }}
    secrets:
      PUBLISHER_APP_PRIVATE_KEY:     ${{ secrets.PUBLISHER_APP_PRIVATE_KEY }}