Skip to content

use "corepack enable" for dependencies #10

use "corepack enable" for dependencies

use "corepack enable" for dependencies #10

Workflow file for this run

name: Android Build and Release
on:
push:
paths-ignore:
- 'ios/**'
workflow_dispatch: # Allows manual triggering from the Actions tab
jobs:
build:
name: Build Android APKs
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.0.0'
cache: 'npm'
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '17' # Recommended for modern React Native/Gradle versions
distribution: 'zulu'
- name: Install Dependencies
run: |
# Enable Corepack to use the Yarn version defined in your project
corepack enable
# Use --immutable to ensure the build is deterministic
# Use --inline-builds to see the EXACT error if a patch fails again
yarn install --immutable --inline-builds
# Install the CLI via npm (this is fine for global tools)
npm install -g react-native-cli
- name: Run Jetifier
run: npx jetify -r
- name: Change wrapper permissions
run: chmod +x android/gradlew
- name: Build DevDebug APK
run: |
cd android
./gradlew assembleDevDebug
- name: Build Debug APK
run: |
cd android
./gradlew assembleDebug
- name: Upload APKs to Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
android/app/build/outputs/apk/dev/debug/*.apk
android/app/build/outputs/apk/debug/*.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}