chore: github action #1
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 | |
| on: | |
| push: | |
| branches: [ "**" ] | |
| paths-ignore: | |
| - '**/*.md' | |
| workflow_dispatch: | |
| jobs: | |
| init: | |
| name: Init | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| build_release_apk: | |
| name: Build App Release APK | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'oracle' | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Validate Gradle wrapper | |
| uses: gradle/actions/wrapper-validation@v4 | |
| - name: Build with Gradle (arm64-v8a) | |
| id: gradle_build_release_arm64 | |
| run: ./gradlew assembleRelease | |
| - name: Upload release apk (arm64-v8a) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-arm64 | |
| path: app/build/outputs/apk/release/app-arm64-v8a-release.apk | |
| - name: Upload release apk (armeabi-v7a) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-arm32 | |
| path: app/build/outputs/apk/release/app-armeabi-v7a-release.apk | |
| - name: Upload release apk (x86_64) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-x86-64 | |
| path: app/build/outputs/apk/release/app-x86_64-release.apk | |
| - name: Upload release apk (x86) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-x86 | |
| path: app/build/outputs/apk/release/app-x86-release.apk | |
| - name: List outputs | |
| run: tree -f app/build/outputs/release |