update workflow

This commit is contained in:
AlexGyver
2026-06-02 20:47:09 +03:00
parent 691cae2cf6
commit 160ed7a24f
+17 -2
View File
@@ -8,13 +8,28 @@ jobs:
name: Send Message name: Send Message
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: send telegram message on push - name: Check if major or minor release
id: semver
shell: bash
run: |
TAG="${{ github.event.release.tag_name }}"
VERSION="${TAG#v}"
PATCH="$(echo "$VERSION" | cut -d. -f3)"
if [[ "$PATCH" == "0" ]]; then
echo "should_send=true" >> "$GITHUB_OUTPUT"
else
echo "should_send=false" >> "$GITHUB_OUTPUT"
fi
- name: send telegram message on release
if: steps.semver.outputs.should_send == 'true'
uses: appleboy/telegram-action@master uses: appleboy/telegram-action@master
with: with:
to: ${{ secrets.TELEGRAM_TO }} to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }} token: ${{ secrets.TELEGRAM_TOKEN }}
disable_web_page_preview: true disable_web_page_preview: true
message: | message: |
${{ github.event.repository.name }} v${{ github.event.release.tag_name }} ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}
${{ github.event.release.body }} ${{ github.event.release.body }}
https://github.com/${{ github.repository }} https://github.com/${{ github.repository }}