Skip to content

feat(ui): align Classic home screen with progressive scroll blur and … #224

feat(ui): align Classic home screen with progressive scroll blur and …

feat(ui): align Classic home screen with progressive scroll blur and … #224

Workflow file for this run

name: Build Debug APK
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build Debug APK
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Remove local Java path from gradle.properties
run: sed -i '/org.gradle.java.home/d' gradle.properties
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Inject Google Services JSON and local.properties
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: |
if [ -z "${GOOGLE_SERVICES_JSON}" ]; then
cat <<EOF > app/google-services.json
{
"project_info": { "project_number": "1234567890", "project_id": "dummy-project" },
"client": [
{ "client_info": { "mobilesdk_app_id": "1:1234567890:android:abcdef123456", "android_client_info": { "package_name": "com.darkxvenom.airbeats" } }, "api_key": [ { "current_key": "dummy-key" } ] },
{ "client_info": { "mobilesdk_app_id": "1:1234567890:android:abcdef123456", "android_client_info": { "package_name": "com.darkxvenom.airbeats.debug" } }, "api_key": [ { "current_key": "dummy-key" } ] }
],
"configuration_version": "1"
}
EOF
else
echo "${GOOGLE_SERVICES_JSON}" | base64 --decode > app/google-services.json
fi
- name: Build Debug APK
run: ./gradlew assembleDebug
- name: Prepare Debug APK & Changelog
run: |
VERSION_NAME=$(grep -oP 'versionName = "\K[^"]+' app/build.gradle.kts || echo "debug")
DEBUG_APK=$(find app/build/outputs/apk/debug -name "*.apk" | head -n 1)
if [ -z "$DEBUG_APK" ]; then
echo "Error: No debug APK found in app/build/outputs/apk/debug"
exit 1
fi
FINAL_APK_NAME="AirBeats-v${VERSION_NAME}-Debug.apk"
cp "$DEBUG_APK" "$FINAL_APK_NAME"
echo "FINAL_APK_NAME=$FINAL_APK_NAME" >> $GITHUB_ENV
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
# Generate commit changelog
COMMITS=$(git log -n 5 --pretty=format:"• %s (%h)" --no-merges || echo "")
if [ -z "$COMMITS" ]; then
COMMITS="• Continuous integration debug build from main branch."
fi
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "$COMMITS" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: AirBeats-Debug-APK
path: ${{ env.FINAL_APK_NAME }}
- name: Upload Debug APK to Telegram (Topic 44)
env:
BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
CHAT_ID: "-1004388752678"
THREAD_ID: "44"
VERSION: ${{ env.VERSION_NAME }}
APK_FILE: ${{ env.FINAL_APK_NAME }}
RELEASE_TYPE: "Debug Build"
CHANGELOG: ${{ env.CHANGELOG }}
RELEASE_URL: "https://github.com/d0x-dev/AirBeats/actions/runs/${{ github.run_id }}"
run: |
pip install requests
python3 .github/scripts/upload_to_telegram.py