name: Discord Release Notification

on:
  release:
    types: [released]

jobs:
  notify-discord:
    runs-on: ubuntu-latest
    if: github.event.release.prerelease == false
    steps:
      - name: Send Discord Notification
        uses: capcom6/discord-webhook@3a447f4ed76c79ed32fb073d705bda1cd45119e6
        with:
          webhook-url: ${{ secrets.DISCORD_WEBHOOK }}
          content: |
            🎉 New Release of [${{ github.event.repository.name }}](${{ github.event.repository.html_url }}): **${{ github.event.release.name }}**

            ${{ github.event.release.body }}

            📦 Download: ${{ github.event.release.html_url }}
          flags: 4 # 4 = SUPPRESS_EMBEDS
