Create notify-discord.yml

This commit is contained in:
Zhe Fang
2025-07-11 19:20:52 -04:00
committed by GitHub
parent 68f690e1a7
commit a5d6dd1305

20
.github/workflows/notify-discord.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Notify Discord on Release
on:
release:
types: [published, edited] # 支持发布和编辑
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Send release message to Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
run: |
curl -H "Content-Type: application/json" \
-X POST \
-d "{
\"content\": \"📢 Release update: *${{ github.event.release.name }}* by ${{ github.actor }}\n🔗 ${{ github.event.release.html_url }}\"
}" \
$DISCORD_WEBHOOK