mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 10:54:55 +08:00
Update release-to-telegram.yml
This commit is contained in:
17
.github/workflows/release-to-telegram.yml
vendored
17
.github/workflows/release-to-telegram.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Notify Telegram on Release
|
||||
name: Notify Telegram on GitHub Release
|
||||
|
||||
on:
|
||||
release:
|
||||
@@ -8,15 +8,20 @@ jobs:
|
||||
notify:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Send message to Telegram
|
||||
- name: Send release info to Telegram
|
||||
env:
|
||||
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||
CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||
RELEASE_URL: ${{ github.event.release.html_url }}
|
||||
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
||||
RELEASE_NAME: ${{ github.event.release.name }}
|
||||
RELEASE_BODY: ${{ github.event.release.body }}
|
||||
run: |
|
||||
curl -s -X POST https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendMessage \
|
||||
-d chat_id=${CHAT_ID} \
|
||||
-d text="🚀 New Release *${RELEASE_TAG}* - ${RELEASE_NAME}\n[View on GitHub](${RELEASE_URL})" \
|
||||
-d parse_mode=Markdown
|
||||
TEXT="🚀 *New Release:* ${RELEASE_TAG} - ${RELEASE_NAME}%0A"
|
||||
TEXT+="📝 *Description:*%0A${RELEASE_BODY}%0A"
|
||||
TEXT+="🔗 [View on GitHub](${RELEASE_URL})"
|
||||
|
||||
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendMessage" \
|
||||
-d chat_id="${CHAT_ID}" \
|
||||
-d text="${TEXT}" \
|
||||
-d parse_mode=Markdown
|
||||
|
||||
Reference in New Issue
Block a user