File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Notify Discord on New Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ jobs :
9+ notify-discord :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Send notification to Discord
13+ env :
14+ DISCORD_WEBHOOK_URL : ${{ secrets.DISCORD_WEBHOOK_URL }}
15+ REPO : ${{ github.repository }}
16+ TAG : ${{ github.ref_name }}
17+ AUTHOR : ${{ github.actor }}
18+ run : |
19+ curl -H "Content-Type: application/json" \
20+ -X POST \
21+ -d '{
22+ "username": "GitHub Actions",
23+ "avatar_url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png",
24+ "embeds": [{
25+ "title": "New release of ${REPO}: '${TAG}'",
26+ "url": "https://github.com/'${REPO}'/releases/tag/'${TAG}'",
27+ "description": "${REPO} ${TAG} just released!",
28+ "color": 5814783
29+ }]
30+ }' \
31+ $DISCORD_WEBHOOK_URL
You can’t perform that action at this time.
0 commit comments