Skip to content

Update README main player screenshot #395

Update README main player screenshot

Update README main player screenshot #395

Workflow file for this run

name: Build APK
on:
push:
branches:
- main
- 'claude/**'
- 'feat/**'
- 'fix/**'
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: false
- name: Init submodules with retry
shell: bash
run: |
attempts=0
max_attempts=5
until git submodule update --init --recursive --jobs 4; do
attempts=$((attempts + 1))
if [ "$attempts" -ge "$max_attempts" ]; then
echo "::error::Submodule init failed after $max_attempts attempts"
exit 1
fi
delay=$((5 * attempts))
echo "::warning::Submodule init failed (attempt $attempts/$max_attempts); retrying in ${delay}s..."
sleep "$delay"
done
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Install Android NDK r29
run: sdkmanager "ndk;29.0.14206865"
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build debug APK
shell: bash
run: |
set -o pipefail
./gradlew assembleDebug --stacktrace 2>&1 | tee gradle-build.log
- name: Summarize build failure
if: failure()
run: |
echo "::group::Gradle build failure tail"
tail -n 200 gradle-build.log | tee -a "$GITHUB_STEP_SUMMARY"
echo "::endgroup::"
first=$(grep -E -m 1 "^e: |FAILURE:|error:|Unresolved reference|Execution failed|CMake Error|ndk-build" gradle-build.log || true)
if [ -n "$first" ]; then
echo "::error::$first"
fi
- name: Upload build log
if: always()
uses: actions/upload-artifact@v4
with:
name: build-yml-log
path: gradle-build.log
retention-days: 14
if-no-files-found: ignore
- name: Locate built APKs
if: success()
run: |
echo "::group::APK tree under app/build/outputs"
find app/build/outputs -maxdepth 6 -type f \( -name "*.apk" -o -name "*.aab" \) -print | tee apk-manifest.txt
echo "::endgroup::"
if [ ! -s apk-manifest.txt ]; then
echo "::warning::assembleDebug produced no APK under app/build/outputs."
fi
- name: Upload debug APK
uses: actions/upload-artifact@v4
with:
name: monotrypt-debug-${{ github.sha }}
path: |
app/build/outputs/apk/**/*.apk
app/build/outputs/bundle/**/*.aab
retention-days: 14
if-no-files-found: warn