Skip to content

updating iOS pipeline #45

updating iOS pipeline

updating iOS pipeline #45

Workflow file for this run

name: Build Android
on:
push:
branches: '*'
jobs:
android-build:
name: Android Build
runs-on: ubuntu-latest
steps:
- name: Show runner machine infomation
run: uname -a
- name: Cancel previous runs
uses: styfle/[email protected]
- name: Checkout repo from master branch
uses: actions/checkout@v3
- name: Start the Docker container
run: |
docker run -d --name react-native-app-container -v ${{ github.workspace }}:/workspace reactnativecommunity/react-native-android:latest tail -f /dev/null
- name: Build the React Native library
run: docker exec react-native-app-container /bin/sh -c "cd /workspace && ls && yarn install --dev react-native-builder-bob && npm run prepare && npm pack && mkdir /workspace/example/android/app/src/main/assets && cd /workspace/example && ls && npm install && npx react-native clean && npm install /workspace/react-native-cashfree-pg-sdk-2.1.4.tgz"
- name: Build the React Native example
run: docker exec react-native-app-container /bin/sh -c "cd /workspace/example && ls && npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output /workspace/example/android/app/src/main/assets/index.android.bundle --assets-dest /workspace/example/android/app/src/main/res"
- name: Build the Android APK
run: |
docker exec react-native-app-container /bin/sh -c "cd /workspace/example/android && chmod +x gradlew && ./gradlew assembleRelease"
- name: Stop and remove the Docker container
run: |
docker stop react-native-app-container && docker rm react-native-app-container
ios-build:
name: IOS Build
runs-on: macOS-latest
defaults:
run:
working-directory: example/ios
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore node_modules from cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile --network-timeout 300000
- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.4
bundler-cache: true
- name: Restore Pods cache
uses: actions/cache@v2
with:
path: |
ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install Pods
run: ls && pod install --repo-update && cd ..
- name: Build IOS App
continue-on-error: true
uses: yukiarrr/[email protected]
with:
project-path: example/ios/CashfreePgApiExample.xcodeproj
p12-base64: ${{ secrets.IOS_P12_BASE64 }}
mobileprovision-base64: ${{ secrets.IOS_MOBILE_PROVISION_BASE64 }}
code-signing-identity: 'iPhone Distribution'
team-id: ${{ secrets.IOS_TEAM_ID }}
certificate-password: ${{ secrets.IOS_CERTIFICATE_PASSWORD }}
workspace-path: example/ios/CashfreePgApiExample.xcworkspace
scheme: CashfreePgApiExample