-
Notifications
You must be signed in to change notification settings - Fork 2
20 lines (17 loc) · 763 Bytes
/
release.yml
File metadata and controls
20 lines (17 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Discord Webhook to publish releases
name: System Integration
on:
release:
types: [published]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Dispatch
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
RELEASE_NAME: ${{ github.event.release.name }}
RELEASE_BODY: ${{ github.event.release.body }}
RELEASE_URL: ${{ github.event.release.html_url }}
REPO_NAME: ${{ github.repository }}
run: echo "{\"embeds\":[{\"title\":\"${RELEASE_NAME}\",\"url\":\"${RELEASE_URL}\",\"description\":\"${RELEASE_BODY}\",\"color\":16711935,\"footer\":{\"text\":\"${REPO_NAME}\"}}]}" > payload.json && curl -X POST -H "Content-Type: application/json" -d @payload.json "$DISCORD_WEBHOOK"