Update README.md #8
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: [main, master] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Setup JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| with: | |
| cmdline-tools-version: 11076708 | |
| packages: 'platform-tools platforms;android-34 build-tools;34.0.0' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build web app | |
| run: npm run build | |
| - name: Sync Capacitor Android | |
| run: npx cap sync android | |
| - name: Build APK | |
| run: | | |
| cd android | |
| ./gradlew assembleDebug | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: codelearn-debug-apk | |
| path: android/app/build/outputs/apk/debug/app-debug.apk |