fix(modules/bridge/AdditionalBridgeMethodsModule): use Activity to al… #74
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: | ||
| branches: [ '**' ] | ||
| pull_request: | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| JAVA_VERSION: 17 | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Setup Java | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: temurin | ||
| java-version: ${{ env.JAVA_VERSION }} | ||
| cache: gradle | ||
| - name: Setup Android SDK | ||
| uses: android-actions/setup-android@v2 | ||
| - name: Make Gradle executable | ||
| run: chmod +x ./gradlew | ||
| - name: Optional Keystore (if provided) | ||
| if: ${{ secrets.keystore != '' }} | ||
| run: | | ||
| echo "${{ secrets.keystore }}" | base64 -d > signing-key.jks | ||
| ls -l signing-key.jks | ||
| - name: Assemble Debug and Release | ||
| run: | | ||
| if [ -f signing-key.jks ]; then | ||
| ./gradlew \ | ||
| assembleDebug \ | ||
| assembleRelease \ | ||
| -Pandroid.injected.signing.store.file=$GITHUB_WORKSPACE/signing-key.jks \ | ||
| -Pandroid.injected.signing.store.password='${{ secrets.keystore_password }}' \ | ||
| -Pandroid.injected.signing.key.alias='${{ secrets.key_alias }}' \ | ||
| -Pandroid.injected.signing.key.password='${{ secrets.key_password }}' | ||
| else | ||
| ./gradlew assembleDebug assembleRelease | ||
| fi | ||
| env: | ||
| GRADLE_OPTS: -Dorg.gradle.daemon=false | ||
| - name: Collect APKs | ||
| run: | | ||
| mkdir -p dist | ||
| cp app/build/outputs/apk/debug/*.apk dist/ || true | ||
| # Prefer signed release if produced | ||
| if ls app/build/outputs/apk/release/*-signed.apk >/dev/null 2>&1; then | ||
| cp app/build/outputs/apk/release/*-signed.apk dist/ | ||
| else | ||
| cp app/build/outputs/apk/release/*.apk dist/ | ||
| fi | ||
| ls -1 dist | ||
| - name: Upload All APKs | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: apks | ||
| path: dist/*.apk | ||
| if-no-files-found: error | ||