Skip to content

changes

changes #88

Workflow file for this run

name: Build Android
jobs:
build-testing:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js v14
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install dependencies
run: |
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
elif [ -e package-lock.json ]; then
npm ci
else
npm i
fi
- name: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Cache Gradle Dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Make Gradlew Executable
run: cd android && chmod +x ./gradlew
- name: Build assets folder
run: |
cd android/app/src/main &&
if [ -d "assets" ]; then
rm -r assets
fi
- name: Build release
run: |
mkdir -p android/app/src/main/assets &&
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res &&
cd android &&
./gradlew assembleDebug
- name: list files
run: ls -lrt android/app/build/outputs/apk/debug
- name: upload artifact to Firebase App Distribution
uses: wzieba/[email protected]
with:
appId: ${{secrets.FIREBASE_APP_ID}}
token: ${{secrets.FIREBASE_TOKEN}}
groups: ${{secrets.GROUPS}}
file: android/app/build/outputs/apk/debug/app-debug.apk