name: build on: release: types: [published] jobs: android: name: Android APK to F-Droid runs-on: ubuntu-latest steps: - name: Checkout uses: https://github.com/actions/checkout@v4 - name: Setup Java 17 uses: actions/setup-java@v4 with: java-version: 17 distribution: adopt - name: Setup Android SDK shell: bash run: | set -euo pipefail export ANDROID_HOME=$HOME/android-sdk mkdir -p "$ANDROID_HOME/cmdline-tools" if [ ! -x "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" ]; then curl -sSL -o /tmp/cmdtools.zip https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip unzip -q -o /tmp/cmdtools.zip -d "$ANDROID_HOME/cmdline-tools" mv "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/latest" fi yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null || true "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "platforms;android-35" "build-tools;36.0.0" > /dev/null echo "ANDROID_HOME=$ANDROID_HOME" >> "$GITHUB_ENV" - name: Build APKs shell: bash run: | chmod +x gradlew ./gradlew :app-phone:assembleRelease :app-glasses:assembleRelease \ -PversionCode=${{ gitea.ref_name }} \ --no-daemon --stacktrace - name: Publish phone to F-Droid uses: https://git.binom.pw/subochev/devops/fdroid-publish@main with: apk_path: "app-phone/build/outputs/apk/release/app-phone-release-unsigned.apk" - name: Publish glasses to F-Droid uses: https://git.binom.pw/subochev/devops/fdroid-publish@main with: apk_path: "app-glasses/build/outputs/apk/release/app-glasses-release-unsigned.apk"