Add telegram Release push

This commit is contained in:
root
2025-10-03 15:32:54 +00:00
parent fa88fd20c8
commit 1f0cf828da

View File

@@ -182,17 +182,6 @@ jobs:
### What's Changed ### What's Changed
See the [full commit history](${{ github.server_url }}/${{ github.repository }}/compare/${{ github.event.before }}...${{ github.sha }}) See the [full commit history](${{ github.server_url }}/${{ github.repository }}/compare/${{ github.event.before }}...${{ github.sha }})
EOF EOF
- name: Delete previous release if exists
run: |
RELEASE_ID=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ steps.version.outputs.version }}" \
| jq -r '.id // empty')
if [ ! -z "$RELEASE_ID" ]; then
echo "Deleting previous release $RELEASE_ID"
curl -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/releases/$RELEASE_ID"
fi
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -237,10 +226,10 @@ jobs:
🔗 [View Release](${REPO_URL}/releases/tag/${VERSION})" 🔗 [View Release](${REPO_URL}/releases/tag/${VERSION})"
# Send message to Telegram # Send message to Telegram
curl -s -X POST "https://api.telegram.org/bot8376391003:AAHhDrAkGDQbxK7DAvtFfoXyp3cv9sGdkwg/sendMessage" \ curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "{ -d "{
\"chat_id\": \"-1003117144167\", \"chat_id\": \"${{ secrets.TELEGRAM_CHAT_ID }}\",
\"text\": \"$MESSAGE\", \"text\": \"$MESSAGE\",
\"parse_mode\": \"Markdown\", \"parse_mode\": \"Markdown\",
\"disable_web_page_preview\": true \"disable_web_page_preview\": true
@@ -248,20 +237,20 @@ jobs:
# Send APK files # Send APK files
echo "Uploading ARM64 APK to Telegram..." echo "Uploading ARM64 APK to Telegram..."
curl -s -X POST "https://api.telegram.org/bot8376391003:AAHhDrAkGDQbxK7DAvtFfoXyp3cv9sGdkwg/sendDocument" \ curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument" \
-F "chat_id=-1003117144167" \ -F "chat_id=${{ secrets.TELEGRAM_CHAT_ID }}" \
-F "document=@./apks/app-arm64-v8a-release.apk" \ -F "document=@./apks/app-arm64-v8a-release.apk" \
-F "caption=📱 NeoMovies ${VERSION} - ARM64 (Recommended)" -F "caption=📱 NeoMovies ${VERSION} - ARM64 (Recommended)"
echo "Uploading ARM32 APK to Telegram..." echo "Uploading ARM32 APK to Telegram..."
curl -s -X POST "https://api.telegram.org/bot8376391003:AAHhDrAkGDQbxK7DAvtFfoXyp3cv9sGdkwg/sendDocument" \ curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument" \
-F "chat_id=-1003117144167" \ -F "chat_id=${{ secrets.TELEGRAM_CHAT_ID }}" \
-F "document=@./apks/app-armeabi-v7a-release.apk" \ -F "document=@./apks/app-armeabi-v7a-release.apk" \
-F "caption=📱 NeoMovies ${VERSION} - ARM32 (For older devices)" -F "caption=📱 NeoMovies ${VERSION} - ARM32 (For older devices)"
echo "Uploading x86_64 APK to Telegram..." echo "Uploading x86_64 APK to Telegram..."
curl -s -X POST "https://api.telegram.org/bot8376391003:AAHhDrAkGDQbxK7DAvtFfoXyp3cv9sGdkwg/sendDocument" \ curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument" \
-F "chat_id=-1003117144167" \ -F "chat_id=${{ secrets.TELEGRAM_CHAT_ID }}" \
-F "document=@./apks/app-x86_64-release.apk" \ -F "document=@./apks/app-x86_64-release.apk" \
-F "caption=📱 NeoMovies ${VERSION} - x86_64 (For emulators)" -F "caption=📱 NeoMovies ${VERSION} - x86_64 (For emulators)"