From a5d6dd1305f8d9463ccd8458dfd607e85e601d99 Mon Sep 17 00:00:00 2001 From: Zhe Fang Date: Fri, 11 Jul 2025 19:20:52 -0400 Subject: [PATCH] Create notify-discord.yml --- .github/workflows/notify-discord.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/notify-discord.yml diff --git a/.github/workflows/notify-discord.yml b/.github/workflows/notify-discord.yml new file mode 100644 index 0000000..2c6bcab --- /dev/null +++ b/.github/workflows/notify-discord.yml @@ -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