name: Build Blaze 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: submodules: recursive - name: Set up JDK 17 uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' cache: gradle - name: Setup Android SDK uses: android-actions/setup-android@v3 - name: Cache Gradle uses: actions/cache@v4 with: path: | ~/.gradle/caches ~/.gradle/wrapper key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: gradle-${{ runner.os }}- - name: Write local.properties run: | echo "sdk.dir=$ANDROID_HOME" > local.properties echo "GEMINI_API_KEY=${{ secrets.GEMINI_API_KEY }}" >> local.properties - name: Grant execute permission to gradlew run: chmod +x gradlew - name: Build Debug APK run: ./gradlew assembleDebug --no-daemon - name: Upload APK uses: actions/upload-artifact@v4 with: name: blaze-debug-${{ github.sha }} path: app/build/outputs/apk/debug/app-debug.apk retention-days: 30 - name: Build Summary run: | echo "## ✅ Blaze Debug APK Built!" >> $GITHUB_STEP_SUMMARY echo "**Commit:** ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY echo "**Download:** Actions → This run → Artifacts" >> $GITHUB_STEP_SUMMARY