mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 10:54:55 +08:00
Create release-to-telegram.yml
This commit is contained in:
22
.github/workflows/release-to-telegram.yml
vendored
Normal file
22
.github/workflows/release-to-telegram.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Notify Telegram on Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Send message 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 }}
|
||||
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
|
||||
Reference in New Issue
Block a user