Merge: Fix CI + God-Tier Upgrade #8
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: Build APK | |
| on: | |
| push: | |
| tags: ['v*'] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-apk: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build web app | |
| run: npx vite build --base ./ | |
| - name: Setup Capacitor 5 | |
| run: | | |
| npm install @capacitor/core@5 @capacitor/cli@5 @capacitor/android@5 | |
| cat > capacitor.config.json << 'CAPEOF' | |
| { | |
| "appId": "com.tapiwa.todoapp", | |
| "appName": "Todo App", | |
| "webDir": "dist", | |
| "server": { "androidScheme": "https" } | |
| } | |
| CAPEOF | |
| npx cap add android | |
| npx cap sync | |
| - name: Build APK | |
| working-directory: android | |
| run: | | |
| chmod +x gradlew | |
| ./gradlew assembleDebug | |
| - name: Upload APK | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: android/app/build/outputs/apk/debug/app-debug.apk |