chore: release 5.19.3 #78
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: Build and Release APK | |
| on: | |
| release: | |
| types: [created] | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| inputs: | |
| tag_name: | |
| description: "Tag name for the release (e.g., v1.0.0)" | |
| required: false | |
| default: "" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "yarn" | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" | |
| java-version: "17" | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Cache Gradle | |
| 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: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Fix Hermes compiler permissions | |
| run: | | |
| # Find and make all hermesc binaries executable | |
| find node_modules -name "hermesc" -type f -exec chmod +x {} \; | |
| # Create symlink from old path to new location if needed | |
| OLD_PATH="node_modules/react-native/sdks/hermesc" | |
| NEW_PATH="node_modules/hermes-compiler/hermesc" | |
| if [ ! -d "$OLD_PATH" ] && [ -d "$NEW_PATH" ]; then | |
| mkdir -p "$(dirname $OLD_PATH)" | |
| # Use absolute path for symlink | |
| ln -s "$(realpath $NEW_PATH)" "$OLD_PATH" | |
| echo "Created symlink: $OLD_PATH -> $(realpath $NEW_PATH)" | |
| fi | |
| # Debug info | |
| echo "=== Checking hermesc ===" | |
| ls -la "$OLD_PATH/linux64-bin/" || echo "Directory not found" | |
| ls -la "$NEW_PATH/linux64-bin/" || echo "New path not found" | |
| # Test execution | |
| HERMESC="$NEW_PATH/linux64-bin/hermesc" | |
| if [ -f "$HERMESC" ]; then | |
| echo "Testing hermesc directly..." | |
| file "$HERMESC" | |
| ldd "$HERMESC" 2>&1 || true | |
| "$HERMESC" --version 2>&1 || echo "Direct execution failed" | |
| fi | |
| - name: Build APK | |
| run: | | |
| cd android | |
| ./gradlew :app:assembleRelease -PreactNativeArchitectures=arm64-v8a | |
| - name: Upload APK artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mova-release-apk | |
| path: android/app/build/outputs/apk/release/app-release.apk | |
| - name: Upload APK to Release | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: android/app/build/outputs/apk/release/app-release.apk | |
| - name: Create Release (tag push) | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Release ${{ github.ref_name }} | |
| files: android/app/build/outputs/apk/release/app-release.apk | |
| generate_release_notes: true | |
| - name: Create Release (manual dispatch) | |
| if: github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != '' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.event.inputs.tag_name }} | |
| name: Release ${{ github.event.inputs.tag_name }} | |
| files: android/app/build/outputs/apk/release/app-release.apk | |
| generate_release_notes: true |