Skip to content

feat: watch state #2687

feat: watch state

feat: watch state #2687

Workflow file for this run

name: release-ios
on:
pull_request:
branches:
- feat/prime-login0-limi
push:
branches:
- feat/prime-login0-limi
workflow_run:
workflows:
- daily-build
types:
- completed
workflow_dispatch:
inputs:
is-split-bundle:
description: "Should it run as split-bundle? (keep it null if you don't need it)"
required: false
default: ''
jobs:
release-ios:
runs-on: ubuntu-latest
if: ${{ !github.event.workflow_run || (github.event.workflow_run && github.event.workflow_run.conclusion == 'success') }}
steps:
- name: Checkout Source Code
uses: actions/checkout@v3
with:
lfs: true
- name: Run Shared Env Setup
uses: ./.github/actions/shared-env
with:
additional_env: |
NO_FLIPPER=1
SENTRY_DISABLE_AUTO_UPLOAD=false
env_file_name: '.env.expo'
sentry_project: ''
covalent_key: ${{ secrets.COVALENT_KEY }}
sentry_token: ${{ secrets.SENTRY_TOKEN }}
privy_app_id: ${{ secrets.PRIVY_APP_ID }}
privy_mobile_client_id: ${{ secrets.PRIVY_MOBILE_CLIENT_ID }}
revenuecat_api_key_web: ${{ secrets.REVENUECAT_API_KEY_WEB }}
revenuecat_api_key_web_sandbox: ${{ secrets.REVENUECAT_API_KEY_WEB_SANDBOX }}
revenuecat_api_key_apple: ${{ secrets.REVENUECAT_API_KEY_APPLE }}
revenuecat_api_key_google: ${{ secrets.REVENUECAT_API_KEY_GOOGLE }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
registry-url: 'https://npm.pkg.github.com'
always-auth: true
scope: '@onekeyhq'
- name: Setup keys secret
run: |
echo ${{ secrets.GOOGLE_SERVICE_IOS }} | base64 -d > apps/mobile/ios/OneKeyWallet/GoogleService-Info.plist
echo ${{ secrets.ASC_API_KEY }} | base64 -d > apps/mobile/AscApiKey.p8
- name: Setup Expo
uses: OneKeyHQ/actions/expo-server@main
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Setup Credentials
run: |
mkdir apps/mobile/ios/certs
echo ${{ secrets.CREDENTIALS_JSON }} | base64 -d > apps/mobile/credentials.json
echo ${{ secrets.DIST_CERT_P12 }} | base64 -d > apps/mobile/ios/certs/dist.p12
echo ${{ secrets.ADHOC_PROFILE }} | base64 -d > apps/mobile/ios/certs/profile.mobileprovision
echo ${{ secrets.ADHOC_SERVICE_EXTENSION_PROFILE }} | base64 -d > apps/mobile/ios/certs/serviceextension-profile.mobileprovision
- name: Modify OneKeyWallet info.plist
uses: OneKeyHQ/actions/build-plist-edit@main
with:
buildNumber: ${{ env.BUILD_NUMBER }}
versionName: ${{ env.BUILD_APP_VERSION }}
projectName: OneKeyWallet
dir: ./apps/mobile
- name: Modify ServiceExtension info.plist
uses: OneKeyHQ/actions/build-plist-edit@main
with:
buildNumber: ${{ env.BUILD_NUMBER }}
versionName: ${{ env.BUILD_APP_VERSION }}
projectName: ServiceExtension
dir: ./apps/mobile
- name: Write .env.version
run: |
# pass BUILD_NUMBER as env variable to expo server
echo "BUILD_NUMBER=${{ env.BUILD_NUMBER }}" >> .env.version
- name: Write .sentry.properties
run: |
echo "auth.token=${{ secrets.SENTRY_TOKEN }}" >> apps/mobile/ios/sentry.properties
- name: Install Dep
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: '--max_old_space_size=8192'
run: |
yarn
- name: Build on EAS And Auto Submit
if: ${{ github.event.workflow_run }}
run: |
cd apps/mobile
# eas build --profile=production --platform ios --non-interactive --no-wait
# replace APP STORE provision
echo ${{ secrets.APPSTORE_PROFILE }} | base64 -d > ./ios/certs/profile.mobileprovision
echo ${{ secrets.APPSTORE_SERVICE_EXTENSION_PROFILE }} | base64 -d > ./ios/certs/serviceextension-profile.mobileprovision
eas build --profile=production-store --platform ios --non-interactive --no-wait --auto-submit
- name: Build on EAS
if: ${{ !github.event.workflow_run }}
run: |
cd apps/mobile
eas build --profile=production --platform ios --non-interactive --no-wait