-
Notifications
You must be signed in to change notification settings - Fork 1
141 lines (129 loc) · 4.56 KB
/
build-shared-ios.yml
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
on:
workflow_call:
inputs:
STRICT:
required: false
type: string
default: 'true'
upload:
required: false
type: string
default: 'false'
APP_BUILD:
required: false
type: string
default: 'v1'
secrets:
MAPBOX_DOWNLOADS_TOKEN:
required: true
PUBLIC_MAPBOX_TOKEN:
required: false
APPLE_P12_BASE64:
required: true
APPLE_MOBILE_PROVISION_BASE64:
required: true
APPLE_CERTIFICATE_PASSWORD:
required: true
APPLE_ISSUER_ID:
required: false
APPLE_KEY_ID:
required: false
APPLE_APP_STORE_CONNECT_PRIVATE_KEY:
required: false
SENTRY_DSN:
required: false
SENTRY_AUTH_TOKEN:
required: false
jobs:
environment: ${{ github.event.inputs.environment }}
ios-build:
name: iOS Build
runs-on: macos-14
env:
STRICT: ${{ inputs.STRICT }}
ENV: ${{ vars.ENV }}
TERRASO_BACKEND: ${{ vars.TERRASO_BACKEND }}
APP_BUILD: ${{ inputs.APP_BUILD }}
GOOGLE_OAUTH_ANDROID_CLIENT_ID: ${{ vars.GOOGLE_OAUTH_ANDROID_CLIENT_ID }}
GOOGLE_OAUTH_IOS_CLIENT_ID: ${{ vars.GOOGLE_OAUTH_IOS_CLIENT_ID }}
GOOGLE_OAUTH_IOS_URI_SCHEME: ${{ vars.GOOGLE_OAUTH_IOS_URI_SCHEME }}
MICROSOFT_OAUTH_CLIENT_ID: ${{ vars.MICROSOFT_OAUTH_CLIENT_ID }}
MICROSOFT_SIGNATURE_HASH: ${{ vars.MICROSOFT_SIGNATURE_HASH }}
MAPBOX_DOWNLOADS_TOKEN: ${{ secrets.MAPBOX_DOWNLOADS_TOKEN }}
PUBLIC_MAPBOX_TOKEN: ${{ secrets.PUBLIC_MAPBOX_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_ENABLED: ${{ vars.SENTRY_ENABLED }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_DISABLE_AUTO_UPLOAD: ${{ inputs.upload == 'false' && 'true' || 'false' }}
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
CLANG: clang
CLANGPLUSPLUS: clang++
LD: clang
LDPLUSPLUS: clang++
steps:
- name: test
run: |
echo "environment = ${{ github.event.inputs.environment }}"
echo "ENV = ${{ env.ENV }}"
echo "TERRASO_BACKEND = ${{ env.TERRASO_BACKEND }}"
exit 1
- name: Check out git repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.tool-versions'
cache: 'npm'
cache-dependency-path: dev-client/package-lock.json
- name: Install and configure ccache
run: |
brew install ccache
ln -s $(which ccache) /usr/local/bin/gcc
ln -s $(which ccache) /usr/local/bin/g++
ln -s $(which ccache) /usr/local/bin/cc
ln -s $(which ccache) /usr/local/bin/c++
ln -s $(which ccache) /usr/local/bin/clang
ln -s $(which ccache) /usr/local/bin/clang++
- name: Install Node dependencies
working-directory: dev-client
run: npm ci
- name: Restore iOS Expo cache
uses: actions/cache@v4
with:
path: |
dev-client/ios
dev-client/node_modules
key: expo-cache-${{ runner.os }}-ios-${{ hashFiles('**/package-lock.json', '**/app.config.ts') }}
restore-keys: expo-cache-${{ runner.os }}-ios-
- name: Generate ios directory
working-directory: dev-client
run: npm run prebuild -- -p ios
- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
working-directory: dev-client
- name: Set Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '^15.4'
- name: Build iOS App
uses: yukiarrr/[email protected]
with:
project-path: dev-client/ios/LandPKSSoilID.xcodeproj
p12-base64: ${{ secrets.APPLE_P12_BASE64 }}
mobileprovision-base64: ${{ secrets.APPLE_MOBILE_PROVISION_BASE64 }}
code-signing-identity: 'iPhone Distribution'
team-id: ${{ vars.APPLE_TEAM_ID }}
certificate-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
workspace-path: dev-client/ios/LandPKSSoilID.xcworkspace
scheme: LandPKSSoilID
- name: Upload app to TestFlight
uses: apple-actions/upload-testflight-build@v1
if: ${{ inputs.upload == 'true' }}
with:
app-path: 'output.ipa'
issuer-id: ${{ secrets.APPLE_ISSUER_ID }}
api-key-id: ${{ secrets.APPLE_KEY_ID }}
api-private-key: ${{ secrets.APPLE_APP_STORE_CONNECT_PRIVATE_KEY }}