Skip to content

Discord Release Notes Notification #5

Discord Release Notes Notification

Discord Release Notes Notification #5

Workflow file for this run

name: Discord Release Notes Notification
on:
release:
types: [published]
jobs:
send-release-notes:
runs-on: ubuntu-latest
steps:
- name: Fetch Release Notes
id: get_release_notes
run: |
API_RESPONSE=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/${{ github.repository }}/releases/latest)
echo "API Response: $API_RESPONSE"
RELEASE_NOTES=$(echo "$API_RESPONSE" | jq -r '.body')
echo "release_notes=$RELEASE_NOTES" >> $GITHUB_ENV
# - name: Send Discord Notification
# env:
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
# run: |
# RELEASE_NOTES=$(echo "${{ steps.get_release_notes.outputs.release_notes }}")
# curl -H "Content-Type: application/json" -X POST -d "{\"content\":\"New release: $RELEASE_NOTES\"}" $DISCORD_WEBHOOK