-
Notifications
You must be signed in to change notification settings - Fork 143
39 lines (35 loc) · 1.34 KB
/
telegram-notify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Notify Telegram on Release
on:
workflow_dispatch:
release:
types: [published]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Format release date
id: format_date
run: |
RELEASE_DATE=$(date -d "${{ github.event.release.created_at }}" +"%d-%m-%Y")
echo "release_date=$RELEASE_DATE" >> $GITHUB_ENV
- name: Check release description
id: check_description
run: |
if [ -z "${{ github.event.release.body }}" ]; then
echo "description=No description provided" >> $GITHUB_ENV
else
echo "description=${{ github.event.release.body }}" >> $GITHUB_ENV
fi
- name: Send Telegram notification
uses: appleboy/telegram-action@master
with:
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
to: ${{ secrets.TELEGRAM_CHAT_ID }}
message: |
Nova atualização publicada!
Data: ${{ env.release_date }}
Versão: ${{ github.event.release.tag_name }}
Descrição: ${{ env.description }}
Link: https://github.com/${{ github.repository }}/releases/tag/${{ github.event.release.tag_name }}
Link do Source: https://api.github.com/repos/${{ github.repository }}/zipball/${{ github.event.release.tag_name }}
#CHANGELOG_V1.X