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 Release APK | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| - main | |
| - indexing | |
| - release/** | |
| paths-ignore: | |
| - '**.md' | |
| - '**.json' | |
| - 'fastlane/**' | |
| - '.github/workflows/crowdin_contributors.yml' | |
| pull_request: | |
| branches: [ dev ] | |
| paths-ignore: | |
| - '**.md' | |
| - '**.json' | |
| - 'fastlane/**' | |
| - '.github/workflows/crowdin_contributors.yml' | |
| workflow_dispatch: | |
| jobs: | |
| build_release_apk: | |
| name: Build Release APK | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Cancel previous runs | |
| uses: styfle/cancel-workflow-action@0.12.1 | |
| with: | |
| access_token: ${{ github.token }} | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'adopt' | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| - name: Cache Gradle dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Create local.properties with signing config (secure) | |
| run: | | |
| echo "signing.storeFile=signing/signing-key.jks" >> local.properties | |
| echo "signing.storePassword=${{ secrets.STORE_PASSWORD }}" >> local.properties | |
| echo "signing.keyAlias=${{ secrets.KEY_ALIAS }}" >> local.properties | |
| echo "signing.keyPassword=${{ secrets.KEY_PASSWORD }}" >> local.properties | |
| env: | |
| STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | |
| KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
| KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
| # Verify the signing directory exists (optional, can be removed) | |
| - name: Verify signing key presence | |
| run: | | |
| if [ ! -f core/app/signing/signing-key.jks ]; then | |
| echo "::error::Keystore file not found at core/app/signing/signing-key.jks" | |
| exit 1 | |
| fi | |
| - name: Build release APK | |
| run: ./gradlew :core:app:assembleRelease | |
| - name: List generated APK files | |
| run: ls -la core/app/build/outputs/apk/release/ | |
| - name: Upload universal release APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-universal-release | |
| path: core/app/build/outputs/apk/release/*universal*.apk | |
| if: always() | |
| - name: Upload arm64-v8a release APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-arm64-v8a-release | |
| path: core/app/build/outputs/apk/release/*arm64-v8a*.apk | |
| if: always() | |
| - name: Upload armeabi-v7a release APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-armeabi-v7a-release | |
| path: core/app/build/outputs/apk/release/*armeabi-v7a*.apk | |
| if: always() | |
| - name: Upload x86_64 release APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-x86_64-release | |
| path: core/app/build/outputs/apk/release/*x86_64*.apk | |
| if: always() |