-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (83 loc) · 2.68 KB
/
ios-build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Deploy iOS to App Center
on:
release:
types: [created]
push:
tags:
- 'v*'
jobs:
build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: Install gpg
run: brew install gnupg
- name: Switch XCode Version
run: sudo xcode-select -s /Applications/Xcode_12.4.app
- name: Cache NPM dependencies
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-npm-cache-
- name: Install npm dependencies
run: |
npm ci
- name: Install Waggle
run: |
cd nodejs-assets/nodejs-project
npm ci
- name: Remove incompatible dependencies
run: |
cd nodejs-assets/nodejs-project
rm -rf node_modules/wrtc
- name: Apply mobile patch
run: |
cd nodejs-assets/nodejs-project
patch -f -p0 < modules.patch
sed -i '' "s/.*wrtc.*/ \"wrtc\": \"..\/..\/wrtc-mock\"/" node_modules/waggle/package.json
- name: Cache Pods dependencies
uses: actions/cache@v1
with:
path: ios/Pods
key: ${{ runner.OS }}-pods-cache-${{ hashFiles('**/ios/Podfile.lock') }}
restore-keys: |
${{ runner.OS }}-pods-cache-
- name: Install pod dependencies
run: |
cd ios
pod install
shell: bash
- name: Setup provisioning profile
run: ./.github/secrets/decrypt_secrets.sh
env:
IOS_PROFILE_KEY: ${{ secrets.IOS_PROFILE_KEY }}
- name: Build app
run: |
cd ios && xcodebuild archive \
-workspace ZbayMobile.xcworkspace \
-scheme ZbayMobile \
-sdk iphoneos14.4 \
-configuration Release \
-archivePath $PWD/build/ZbayMobile.xcarchive \
IPHONEOS_DEPLOYMENT_TARGET=14.1
PROVISIONING_PROFILE="654a2214-095f-4939-a9e5-09f7a2ccf530" \
CODE_SIGN_IDENTITY="Apple Distribution: Zbay LLC (CTYKSWN9T4)"
- name: Export app
run: |
cd ios && xcodebuild \
-exportArchive \
-archivePath $PWD/build/ZbayMobile.xcarchive \
-exportOptionsPlist $PWD/ci.plist \
-exportPath $PWD/build
- name: Upload ipa
run: |
cd ios && xcrun altool --upload-app \
--type ios \
--file build/ZbayMobile.ipa \
-u $APPSTORE_USER -p $APP_PASSWORD \
--verbose
env:
APPSTORE_USER: ${{ secrets.APPSTORE_USER }}
APP_PASSWORD: ${{ secrets.APP_PASSWORD }}