discord-notify.yml

 1name: Discord Release Notification
 2
 3on:
 4  release:
 5    types: [published]
 6
 7jobs:
 8  notify-discord:
 9    name: Notify Discord Channel
10    runs-on: ubuntu-latest
11    if: github.event.release.prerelease == false
12
13    steps:
14      - name: Send Discord Message
15        env:
16          # Pulls the secure webhook URL from your repository secrets
17          DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
18        run: |
19          curl -H "Content-Type: application/json" \
20          -X POST \
21          -d '{
22            "username": "GitHub Releases",
23            "avatar_url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png",
24            "content": "🚀 **A new Matcha release has been published!**\n\n**Release:** ${{ github.event.release.name }}\n\nCheck it out here: ${{ github.event.release.html_url }}"
25          }' \
26          $DISCORD_WEBHOOK_URL