Android Build #505
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Android Build | |
| on: | |
| workflow_dispatch: # Ermöglicht manuelle Ausführung des Workflows | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Decode google-services.json (app) | |
| env: | |
| GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON_APP }} | |
| run: printf '%s' "$GOOGLE_SERVICES_JSON" > app/google-services.json | |
| - name: Decode google-services.json (humanoperator) | |
| env: | |
| GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON_HUMANOPERATOR }} | |
| run: printf '%s' "$GOOGLE_SERVICES_JSON" > humanoperator/google-services.json | |
| - name: Create local.properties | |
| run: echo "sdk.dir=$ANDROID_HOME" > local.properties | |
| - name: Fix gradle.properties for CI | |
| run: sed -i '/org.gradle.java.home=/d' gradle.properties | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build app module (debug) | |
| run: ./gradlew :app:assembleDebug | |
| - name: Build humanoperator module (debug) | |
| run: ./gradlew :humanoperator:assembleDebug | |
| - name: Upload app APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-debug | |
| path: app/build/outputs/apk/debug/app-debug.apk | |
| - name: Upload humanoperator APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: humanoperator-debug | |
| path: humanoperator/build/outputs/apk/debug/humanoperator-debug.apk |