Skip to content

fixes

fixes #6

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- initial
jobs:
android-build:
environment: development
name: Android Dev Build
runs-on: ubuntu-latest
container:
image: reactnativecommunity/react-native-android
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.9.1
- name: Checkout repo from dev branch
uses: actions/checkout@v3
with:
ref: initial
- name: Copy service credentials file
run: echo -n "{{ secrets.FIREBASE_IAM_GOOGLE_SERVICES_JSON}}" | base64 --decode > ./fastlane/wildlife-watcher-service-account.json
- name: Copy google services file
run: echo -e "{{ secrets.ANDROID_GOOGLE_SERVICES_JSON }}" > android/app/google-services.json
- name: Install npm dependency
run: npm install
# - name: Setup Android SDK
# uses: android-actions/setup-android@v2
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
# - name: Setup Gradle
# uses: gradle/gradle-build-action@v2
- name: Execute Gradle build
run: |
cd android
./gradlew build
- name: Install bundler
run: |
cd android
gem install bundler
- name: Install gem plugins
run: |
cd android
bundle install
- name: Run fastlane
run: |
cd android
bundle exec fastlane android build_debug