feat: overhaul mobile touch controls #7
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: Set up Android SDK | |
| uses: android-actions/setup-android@v3 | |
| with: | |
| api-level: 33 | |
| build-tools: 33.0.2 | |
| - 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: Generate debug keystore | |
| run: | | |
| set -euxo pipefail | |
| mkdir -p android | |
| rm -f android/debug.keystore | |
| keytool -genkeypair \ | |
| -alias androiddebugkey \ | |
| -keystore android/debug.keystore \ | |
| -storepass android \ | |
| -keypass android \ | |
| -dname "CN=Android Debug,O=Android,C=US" \ | |
| -keyalg RSA \ | |
| -keysize 2048 \ | |
| -validity 10000 | |
| - name: Configure Godot Android settings | |
| run: | | |
| set -euxo pipefail | |
| mkdir -p "$HOME/.config/godot" | |
| printf '%s\n' \ | |
| '[gd_resource type="EditorSettings" format=3]' \ | |
| '' \ | |
| '[resource]' \ | |
| "export/android/debug_keystore = \"${GITHUB_WORKSPACE}/android/debug.keystore\"" \ | |
| 'export/android/debug_keystore_pass = "android"' \ | |
| "export/android/java_sdk_path = \"${JAVA_HOME}\"" \ | |
| "export/android/android_sdk_path = \"${ANDROID_SDK_ROOT}\"" \ | |
| > "$HOME/.config/godot/editor_settings-4.4.tres" | |
| - 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 |