Add geolocation dependency #17
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: Android CI/CD | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| android-build: | |
| name: Build Android APK | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: npm | |
| - name: Install npm dependencies | |
| run: npm install | |
| - name: Make Gradle executable | |
| run: chmod +x android/gradlew | |
| - name: Build debug APK for branch/PR/manual runs | |
| if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/') | |
| run: | | |
| cd android | |
| ./gradlew assembleDebug | |
| - name: Build release APK for version tags | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: | | |
| cd android | |
| ./gradlew assembleRelease | |
| - name: Upload debug APK artifact | |
| if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/') | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-debug-apk | |
| path: android/app/build/outputs/apk/debug/app-debug.apk | |
| if-no-files-found: error | |
| - name: Upload release APK artifact | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-release-apk | |
| path: android/app/build/outputs/apk/release/app-release.apk | |
| if-no-files-found: error | |
| - name: Create GitHub Release and upload APK | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: android/app/build/outputs/apk/release/app-release.apk | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |