Adds a workflow that builds and uploads a release APK on every push to main/this branch. Signing uses a static test keystore committed to the repo (app/ci-release.keystore.jks) instead of the default auto-generated debug key, so the signature stays identical across builds/runners and users can update the app without a reinstall. This keystore is for CI/testing only, not Google Play distribution.
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Build APK
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- claude/main-bugs-review-nd8dax
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: "17"
|
|
|
|
- name: Set up Android SDK
|
|
uses: android-actions/setup-android@v3
|
|
|
|
- name: Install required SDK packages
|
|
run: sdkmanager "platforms;android-36" "build-tools;36.0.0"
|
|
|
|
- name: Cache Gradle
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', 'gradle/wrapper/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
gradle-${{ runner.os }}-
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
|
|
- name: Build release APK
|
|
run: ./gradlew assembleRelease --stacktrace
|
|
|
|
- name: Upload APK artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: TurnProxy-apk
|
|
path: app/build/outputs/apk/release/*.apk
|
|
if-no-files-found: error
|