feat: mobile app package (#1075)
This commit is contained in:
98
.github/workflows/mobile.build-prod.yml
vendored
Normal file
98
.github/workflows/mobile.build-prod.yml
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
name: Build Production
|
||||
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
android:
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./packages/mobile
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Export version from package.json
|
||||
run:
|
||||
echo "PACKAGE_VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)" >> $GITHUB_ENV
|
||||
- name: Setup react-native kernel and increase watchers
|
||||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
- name: Decode Production Android keystore
|
||||
run: |
|
||||
echo "${{ secrets.ANDROID_KEYSTORE }}" > keystore.keystore.asc
|
||||
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSPHRASE }}" --batch keystore.keystore.asc > android/app/keystore.keystore
|
||||
- name: Install dependencies
|
||||
run: yarn install
|
||||
- name: Ruby Setup for Fastlane
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: fastlane
|
||||
uses: maierj/fastlane-action@v1.4.0
|
||||
env:
|
||||
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}
|
||||
BUILD_NUMBER: ${{ github.run_number }}
|
||||
ANDROID_KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
|
||||
ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD }}
|
||||
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
||||
GOOGLE_PLAY_JSON_KEY_DATA: ${{ secrets.GOOGLE_PLAY_JSON_KEY_DATA }}
|
||||
with:
|
||||
lane: 'android prod'
|
||||
- name: Upload universal apk to artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: prod.apk
|
||||
path: android/app/build/outputs/apk/prod/release/app-prod-release.apk
|
||||
- name: Upload Android App Bundle to artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: release.aab
|
||||
path: android/app/build/outputs/bundle/prodRelease/app-prod-release.aab
|
||||
ios:
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./packages/mobile
|
||||
runs-on: macos-11
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Export version from package.json
|
||||
run:
|
||||
echo "PACKAGE_VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)" >> $GITHUB_ENV
|
||||
- name: Set longer yarn timeout
|
||||
run: yarn config set network-timeout 300000
|
||||
- name: Install dependencies
|
||||
run: yarn run init
|
||||
- name: Set ssh connection to Github
|
||||
uses: webfactory/ssh-agent@v0.4.1
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
- name: Export Apple AppStore Connect API key
|
||||
run: echo "${{ secrets.APPSTORE_CONNECT_KEY }}" > ios/Authkey.p8
|
||||
- name: Ruby Setup for Fastlane
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Setup fastlane
|
||||
uses: maierj/fastlane-action@v1.4.0
|
||||
env:
|
||||
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
|
||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
||||
with:
|
||||
lane: 'ios setup'
|
||||
- name: fastlane
|
||||
uses: maierj/fastlane-action@v1.4.0
|
||||
env:
|
||||
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}
|
||||
APPLE_APP_ID: ${{ secrets.APP_APPLE_ID }}
|
||||
APPSTORE_CONNECT_KEY_ID: ${{ secrets.APPSTORE_CONNECT_KEY_ID }}
|
||||
APPSTORE_CONNECT_KEY_ISSUER_ID: ${{ secrets.APPSTORE_CONNECT_KEY_ISSUER_ID }}
|
||||
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
|
||||
FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }}
|
||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
MATCH_CERTIFICATES_URL: ${{ secrets.MATCH_CERTIFICATES_URL }}
|
||||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
||||
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
|
||||
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
|
||||
BUILD_NUMBER: ${{ github.run_number }}
|
||||
with:
|
||||
lane: 'ios prod'
|
||||
|
||||
100
.github/workflows/mobile.build.yml
vendored
Normal file
100
.github/workflows/mobile.build.yml
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
name: Build Development
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
paths:
|
||||
- packages/mobile/**
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
android:
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./packages/mobile
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
if: "!contains(github.event.head_commit.message, 'skip ci')"
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Export version from package.json
|
||||
run: |
|
||||
echo "PACKAGE_VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)" >> $GITHUB_ENV
|
||||
- name: Setup react-native kernel and increase watchers
|
||||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
- name: Decode Dev Android keystore
|
||||
run: |
|
||||
echo "${{ secrets.DEV_KEYSTORE }}" > keystore.keystore.asc
|
||||
gpg -d --passphrase "${{ secrets.DEV_KEYSTORE_PASSPHRASE }}" --batch keystore.keystore.asc > android/app/keystore.keystore
|
||||
- name: Ruby Setup for Fastlane
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Install dependencies
|
||||
run: yarn install
|
||||
- name: fastlane
|
||||
uses: maierj/fastlane-action@v1.4.0
|
||||
env:
|
||||
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}
|
||||
BUILD_NUMBER: ${{ github.run_number }}
|
||||
ANDROID_KEYSTORE_ALIAS: ${{ secrets.DEV_ANDROID_KEYSTORE_ALIAS }}
|
||||
ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD: ${{ secrets.DEV_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD }}
|
||||
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.DEV_ANDROID_KEYSTORE_PASSWORD }}
|
||||
GOOGLE_PLAY_JSON_KEY_DATA: ${{ secrets.GOOGLE_PLAY_JSON_KEY_DATA }}
|
||||
with:
|
||||
lane: 'android dev'
|
||||
- name: Upload universal apk to artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: dev.apk
|
||||
path: android/app/build/outputs/apk/dev/release/app-dev-release.apk
|
||||
ios:
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./packages/mobile
|
||||
runs-on: macos-11
|
||||
timeout-minutes: 90
|
||||
if: "!contains(github.event.head_commit.message, 'skip ci')"
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Export version from package.json
|
||||
run: |
|
||||
echo "PACKAGE_VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)" >> $GITHUB_ENV
|
||||
- name: Set longer yarn timeout
|
||||
run: yarn config set network-timeout 300000
|
||||
- name: Ruby Setup for Fastlane
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Install dependencies
|
||||
run: yarn run init
|
||||
- name: Set ssh connection to Github
|
||||
uses: webfactory/ssh-agent@v0.4.1
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
- name: Export Apple AppStore Connect API key
|
||||
run: echo "${{ secrets.APPSTORE_CONNECT_KEY }}" > ios/Authkey.p8
|
||||
- name: Setup fastlane
|
||||
uses: maierj/fastlane-action@v1.4.0
|
||||
env:
|
||||
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
|
||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
||||
with:
|
||||
lane: 'ios setup'
|
||||
- name: fastlane
|
||||
uses: maierj/fastlane-action@v1.4.0
|
||||
env:
|
||||
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}
|
||||
APPLE_APP_ID: ${{ secrets.DEV_APP_APPLE_ID }}
|
||||
APPSTORE_CONNECT_KEY_ID: ${{ secrets.APPSTORE_CONNECT_KEY_ID }}
|
||||
APPSTORE_CONNECT_KEY_ISSUER_ID: ${{ secrets.APPSTORE_CONNECT_KEY_ISSUER_ID }}
|
||||
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
|
||||
FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }}
|
||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
MATCH_CERTIFICATES_URL: ${{ secrets.MATCH_CERTIFICATES_URL }}
|
||||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
||||
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
|
||||
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
|
||||
BUILD_NUMBER: ${{ github.run_number }}
|
||||
with:
|
||||
lane: 'ios dev'
|
||||
74
.github/workflows/mobile.e2e.yml
vendored
Normal file
74
.github/workflows/mobile.e2e.yml
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
name: e2e
|
||||
|
||||
on: [workflow_dispatch]
|
||||
|
||||
|
||||
jobs:
|
||||
android:
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./packages/mobile
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Download Android Emulator Image
|
||||
run: |
|
||||
$ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-28;default;x86_64"
|
||||
$ANDROID_HOME/tools/bin/avdmanager create avd -n pixel -d "Nexus 5X" --package "system-images;android-28;default;x86_64"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install
|
||||
|
||||
- name: Add usesCleartextTraffic to release AndroidManifest.xml
|
||||
run: yarn replace-in-file '<application' '<application android:usesCleartextTraffic="true"' ./android/app/src/main/AndroidManifest.xml
|
||||
|
||||
- name: Build for detox
|
||||
env:
|
||||
DETOX_CI: true
|
||||
run: yarn detox build --configuration android.emu.release
|
||||
|
||||
- name: Setup Emulator
|
||||
timeout-minutes: 10
|
||||
run: |
|
||||
echo "Starting emulator"
|
||||
nohup $ANDROID_HOME/emulator/emulator -avd pixel -no-audio -no-snapshot -no-window -gpu swiftshader_indirect &
|
||||
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'
|
||||
$ANDROID_HOME/platform-tools/adb shell settings put global window_animation_scale 0 &
|
||||
$ANDROID_HOME/platform-tools/adb shell settings put global transition_animation_scale 0 &
|
||||
$ANDROID_HOME/platform-tools/adb shell settings put global animator_duration_scale 0 &
|
||||
echo "Emulator started"
|
||||
- name: Run tests
|
||||
run: yarn detox test --configuration android.emu.release
|
||||
|
||||
ios:
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./packages/mobile
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 30
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install
|
||||
|
||||
- name: Install Pods
|
||||
run: npx pod-install ios
|
||||
|
||||
- name: Install detox dependencies
|
||||
run: brew tap wix/brew
|
||||
- name: Install simulator utils
|
||||
run: brew install applesimutils
|
||||
- name: Build for detox
|
||||
run: yarn detox build --configuration ios.sim.release
|
||||
- name: Run tests
|
||||
run: yarn detox test --configuration ios.sim.release
|
||||
20
.github/workflows/mobile.lint.yml
vendored
Normal file
20
.github/workflows/mobile.lint.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: lint & typescript check
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- packages/mobile/**
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./packages/mobile
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
run: yarn install
|
||||
- name: Lint code
|
||||
run: yarn lint
|
||||
2
.github/workflows/pr.yml
vendored
2
.github/workflows/pr.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
with:
|
||||
ruby-version: 2.6.8
|
||||
- name: Install dependencies
|
||||
run: yarn install --pure-lockfile
|
||||
run: yarn install
|
||||
- name: Build
|
||||
run: yarn build
|
||||
- name: ESLint
|
||||
|
||||
2
.github/workflows/web.beta.yml
vendored
2
.github/workflows/web.beta.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
with:
|
||||
ruby-version: 2.6.8
|
||||
- name: Install dependencies
|
||||
run: yarn install --pure-lockfile
|
||||
run: yarn install
|
||||
- name: Build
|
||||
run: yarn build
|
||||
- name: ESLint
|
||||
|
||||
2
.github/workflows/web.dev.yml
vendored
2
.github/workflows/web.dev.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
with:
|
||||
ruby-version: 2.6.8
|
||||
- name: Install dependencies
|
||||
run: yarn install --pure-lockfile
|
||||
run: yarn install
|
||||
- name: Build
|
||||
run: yarn build
|
||||
- name: ESLint
|
||||
|
||||
2
.github/workflows/web.prod.yml
vendored
2
.github/workflows/web.prod.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
with:
|
||||
ruby-version: 2.6.8
|
||||
- name: Install dependencies
|
||||
run: yarn install --pure-lockfile
|
||||
run: yarn install
|
||||
- name: Build
|
||||
run: yarn build
|
||||
- name: ESLint
|
||||
|
||||
Reference in New Issue
Block a user