Checkpoint before follow-up message #3
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: Build Android APK | |
| on: | |
| push: | |
| branches: | |
| - feature/androidbuild | |
| pull_request: | |
| branches: | |
| - feature/androidbuild | |
| workflow_dispatch: | |
| jobs: | |
| android: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| submodules: false | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| - name: Cache Godot binaries and templates | |
| id: cache-godot | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.local/share/godot/export_templates/4.4.stable | |
| ~/godot | |
| key: godot-4.4-stable-${{ runner.os }} | |
| - name: Download Godot | |
| if: steps.cache-godot.outputs.cache-hit != 'true' | |
| run: | | |
| set -euxo pipefail | |
| GODOT_VERSION=4.4-stable | |
| mkdir -p "$HOME/godot" | |
| curl -L "https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}/Godot_v${GODOT_VERSION}_linux.x86_64.zip" -o /tmp/godot_linux.zip | |
| unzip -q /tmp/godot_linux.zip -d "$HOME/godot" | |
| mv "$HOME/godot/Godot_v${GODOT_VERSION}_linux.x86_64" "$HOME/godot/godot" | |
| chmod +x "$HOME/godot/godot" | |
| - name: Install export templates | |
| if: steps.cache-godot.outputs.cache-hit != 'true' | |
| run: | | |
| set -euxo pipefail | |
| GODOT_VERSION=4.4-stable | |
| mkdir -p "$HOME/.local/share/godot/export_templates/4.4.stable" | |
| curl -L "https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}/Godot_v${GODOT_VERSION}_export_templates.tpz" -o /tmp/godot_templates.tpz | |
| unzip -q /tmp/godot_templates.tpz -d /tmp/godot_templates | |
| cp -r /tmp/godot_templates/templates/. "$HOME/.local/share/godot/export_templates/4.4.stable/" | |
| - name: Add Godot to PATH | |
| run: echo "$HOME/godot" >> "$GITHUB_PATH" | |
| - name: Export Android APK | |
| run: | | |
| set -euxo pipefail | |
| mkdir -p build/android | |
| godot --headless --verbose --path . --export-debug "Android" | |
| - name: Upload APK artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: too-fishy-android-debug | |
| path: build/android/TooFishy-debug.apk |