2.0-r1beta the new blackbox development will be continue here

This commit is contained in:
alex5402
2025-08-16 03:44:19 +05:30
commit 25f73f8b41
160 changed files with 10395 additions and 0 deletions
+147
View File
@@ -0,0 +1,147 @@
name: Build and Send APK to Telegram
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-send:
runs-on: ubuntu-latest
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Accept Android SDK licenses
run: yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses || yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses || true
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Build Debug APK
run: ./gradlew assembleDebug
- name: Build Release APK
run: ./gradlew assembleRelease
- name: Find APK paths
id: apk_paths
run: |
DEBUG_APK=$(find ./app/build/outputs/apk/debug -name "*.apk" | head -n 1)
RELEASE_APK=$(find ./app/build/outputs/apk/release -name "*.apk" | head -n 1)
echo "debug_apk_path=$DEBUG_APK" >> $GITHUB_OUTPUT
echo "release_apk_path=$RELEASE_APK" >> $GITHUB_OUTPUT
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq
- name: Send Debug APK to Telegram and Pin
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: |
COMMIT_MSG=$(git log -1 --pretty=%B)
RESPONSE=$(curl -s -F document=@"${{ steps.apk_paths.outputs.debug_apk_path }}" \
-F chat_id="$TELEGRAM_CHAT_ID" \
-F caption="[DEBUG] $COMMIT_MSG" \
https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendDocument)
MESSAGE_ID=$(echo $RESPONSE | jq '.result.message_id')
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/pinChatMessage" \
-d chat_id="$TELEGRAM_CHAT_ID" \
-d message_id="$MESSAGE_ID"
- name: Send Release APK to Telegram and Pin
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: |
COMMIT_MSG=$(git log -1 --pretty=%B)
RESPONSE=$(curl -s -F document=@"${{ steps.apk_paths.outputs.release_apk_path }}" \
-F chat_id="$TELEGRAM_CHAT_ID" \
-F caption="[RELEASE] $COMMIT_MSG" \
https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendDocument)
MESSAGE_ID=$(echo $RESPONSE | jq '.result.message_id')
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/pinChatMessage" \
-d chat_id="$TELEGRAM_CHAT_ID" \
-d message_id="$MESSAGE_ID"
- name: Build Bcore AAR
run: ./gradlew :Bcore:assembleRelease
- name: Find Bcore AAR path
id: aar_path
run: |
AAR=$(find ./Bcore/build/outputs/aar -name "*.aar" | head -n 1)
echo "aar_path=$AAR" >> $GITHUB_OUTPUT
- name: Send Bcore AAR to Telegram and Pin
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: |
COMMIT_MSG=$(git log -1 --pretty=%B)
RESPONSE=$(curl -s -F document=@"${{ steps.aar_path.outputs.aar_path }}" \
-F chat_id="$TELEGRAM_CHAT_ID" \
-F caption="[Bcore AAR] $COMMIT_MSG" \
https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendDocument)
MESSAGE_ID=$(echo $RESPONSE | jq '.result.message_id')
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/pinChatMessage" \
-d chat_id="$TELEGRAM_CHAT_ID" \
-d message_id="$MESSAGE_ID"
- name: Build Bcore Debug AAR
run: ./gradlew :Bcore:assembleDebug
- name: Build Bcore Release AAR
run: ./gradlew :Bcore:assembleRelease
- name: Find Bcore AAR paths
id: aar_paths
run: |
DEBUG_AAR=$(find ./Bcore/build/outputs/aar -name "*debug.aar" | head -n 1)
RELEASE_AAR=$(find ./Bcore/build/outputs/aar -name "*release.aar" | head -n 1)
echo "debug_aar_path=$DEBUG_AAR" >> $GITHUB_OUTPUT
echo "release_aar_path=$RELEASE_AAR" >> $GITHUB_OUTPUT
- name: Send Bcore Debug AAR to Telegram and Pin
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: |
COMMIT_MSG=$(git log -1 --pretty=%B)
RESPONSE=$(curl -s -F document=@"${{ steps.aar_paths.outputs.debug_aar_path }}" \
-F chat_id="$TELEGRAM_CHAT_ID" \
-F caption="[Bcore DEBUG AAR] $COMMIT_MSG" \
https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendDocument)
MESSAGE_ID=$(echo $RESPONSE | jq '.result.message_id')
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/pinChatMessage" \
-d chat_id="$TELEGRAM_CHAT_ID" \
-d message_id="$MESSAGE_ID"
- name: Send Bcore Release AAR to Telegram and Pin
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: |
COMMIT_MSG=$(git log -1 --pretty=%B)
RESPONSE=$(curl -s -F document=@"${{ steps.aar_paths.outputs.release_aar_path }}" \
-F chat_id="$TELEGRAM_CHAT_ID" \
-F caption="[Bcore RELEASE AAR] $COMMIT_MSG" \
https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendDocument)
MESSAGE_ID=$(echo $RESPONSE | jq '.result.message_id')
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/pinChatMessage" \
-d chat_id="$TELEGRAM_CHAT_ID" \
-d message_id="$MESSAGE_ID"