mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 10:54:55 +08:00
Update and rename notify-discord.yml to github-releases-to-discord.yml
This commit is contained in:
20
.github/workflows/github-releases-to-discord.yml
vendored
Normal file
20
.github/workflows/github-releases-to-discord.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
on:
|
||||
release:
|
||||
types: [published, edited]
|
||||
|
||||
jobs:
|
||||
github-releases-to-discord:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: GitHub Releases to Discord
|
||||
uses: SethCohen/github-releases-to-discord@v1
|
||||
with:
|
||||
webhook_url: ${{ secrets.WEBHOOK_URL }}
|
||||
color: "2105893"
|
||||
username: "Release Changelog"
|
||||
avatar_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png"
|
||||
content: "||@everyone||"
|
||||
footer_title: "Changelog"
|
||||
reduce_headings: true
|
||||
20
.github/workflows/notify-discord.yml
vendored
20
.github/workflows/notify-discord.yml
vendored
@@ -1,20 +0,0 @@
|
||||
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
|
||||
Reference in New Issue
Block a user