Notify Telegram on Release #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 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: ${{ github.event.release.body }} | |
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 |