Spaces:
Sleeping
Sleeping
| name: Build Android | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: 'Target Environment (local, remote, hf)' | |
| required: true | |
| default: 'remote' | |
| type: choice | |
| options: | |
| - local | |
| - remote | |
| - hf | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'zulu' | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install Dependencies | |
| run: npm install | |
| - name: Build Web App | |
| run: npm run build | |
| - name: Capacitor Sync | |
| run: | | |
| export CAPACITOR_SERVER_IP_ENV=${{ github.event.inputs.environment }} | |
| npx cap sync android | |
| - name: Build Android App | |
| working-directory: android | |
| run: | | |
| chmod +x gradlew | |
| ./gradlew assembleDebug | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tldraw-${{ github.event.inputs.environment }}-debug.apk | |
| path: android/app/build/outputs/apk/debug/app-debug.apk | |