Skip to content

clean before build

clean before build #33

Workflow file for this run

name: App Dev Builds
on:
push:
branches: [ "nt/gh-actions" ]
jobs:
ios-build:
name: iOS Dev Build
runs-on: macos-latest
environment: Android Dev
steps:
- name: Show host machine infomation
run: uname -a
- name: Cancel previous runs
uses: styfle/[email protected]
- name: Checkout repo from dev branch
uses: actions/checkout@v3
with:
ref: nt/gh-actions
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.0'
- name: Setup Cocoapods
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: 1.15.2
- name: Create Google Services PLIST File
env:
GOOGLE_JSON: ${{ secrets.GOOGLE_PLIST }}
run: echo $GOOGLE_PLIST | base64 --decode > ./ios/GoogleService-Info.plist
# - name: Cache cocoapods
# uses: actions/cache@v3
# with:
# path: /ios/Pods
# key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
# restore-keys: |
# ${{ runner.os }}-pods-
- name: Install npm dependency
run: yarn install
- name: Build iOS JS Bundle
run: |
yarn run package-ios
- name: Install bundler
run: |
cd ios
gem install bundler
- name: Install gem plugins
run: |
cd ios
bundle install
- name: Run fastlane
run: |
cd ios
bundle exec fastlane build_testflight
android-build:
name: Android Dev Build
runs-on: macos-latest
environment: Android Dev
steps:
- name: Show host machine infomation
run: uname -a
- name: Cancel previous runs
uses: styfle/[email protected]
- name: Checkout repo from dev branch
uses: actions/checkout@v3
with:
ref: nt/gh-actions
- name: Install npm dependency
run: yarn install
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
cmdline-tools-version: 11479570
# - 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 8.0.1
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: "8.0.1"
- name: Create Google Services JSON File
env:
GOOGLE_JSON: ${{ secrets.GOOGLE_JSON }}
run: echo $GOOGLE_JSON | base64 --decode > ./android/app/google-services.json
- name: Execute Gradle build
run: |
cd android
./gradlew clean
rm -rf ~/.gradle/caches/*
./gradlew build -x lint
- name: Build Android JS Bundle
run: |
yarn run package-android
- name: Delete Android build duplicate assets resource
run: yarn run delete-pics
- 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 build_qa