Skip to content

Release Notification #3

Release Notification

Release Notification #3

Workflow file for this run

name: Release Notification
on:
workflow_dispatch:
release:
types:
- published
jobs:
notify-telegram:
name: Notify Telegram
runs-on: ubuntu-latest
steps:
- name: Get Latest Release Info
id: latest_release
run: |
release=$(gh release view --json name,tagName,body,url --jq '{name: .name, tag: .tagName, notes: .body, url: .url}')
echo "RELEASE_NAME=$(echo $release | jq -r '.name')" >> $GITHUB_ENV
echo "RELEASE_TAG=$(echo $release | jq -r '.tag')" >> $GITHUB_ENV
echo "RELEASE_NOTES=$(echo $release | jq -r '.notes')" >> $GITHUB_ENV
echo "RELEASE_URL=$(echo $release | jq -r '.url')" >> $GITHUB_ENV
- name: Send Telegram Message
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
🎉 A new release is live! 🎉
**Release:** ${{ env.RELEASE_NAME }}
**Tag:** ${{ env.RELEASE_TAG }}
**Notes:** ${{ env.RELEASE_NOTES }}
🔗 [View Release](${{ env.RELEASE_URL }})