-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (110 loc) · 3.88 KB
/
release_ios_appstore.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
name: Release iOS Production App to AppStore Connect
on:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
shared_test:
name: Running tests in Shared module
runs-on: ubuntu-latest
defaults:
run:
working-directory: shared
steps:
- uses: actions/checkout@v3
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: '11'
- name: Setup Konfig Properties
env:
KMM_KONFIG_PROPERTIES: ${{ secrets.KMM_KONFIG_PROPERTIES }}
run: |
touch ../buildKonfig.properties
echo $KMM_KONFIG_PROPERTIES | base64 --decode > ../buildKonfig.properties
- name: Running tests
run: |
cd ..
./gradlew clean shared:test
ios_release_production:
name: Automatic Release iOS Production App to AppStore Connect
runs-on: macos-latest
defaults:
run:
working-directory: iosApp
steps:
- name: Set up JAVA 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install SSH key - For accessing match repo
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/cache@v3
id: bunlderCache
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Bundle install
run: bundle install --path vendor/bundle
- name: Setup Konfig Properties
env:
KMM_KONFIG_PROPERTIES: ${{ secrets.KMM_KONFIG_PROPERTIES }}
run: |
touch ../buildKonfig.properties
echo $KMM_KONFIG_PROPERTIES | base64 --decode > ../buildKonfig.properties
- name: Paste Google-Info.plist from .secrets
env:
IOS_GOOGLE_SERVICE_INFO_PRODUCTION: ${{ secrets.IOS_PRODUCTION_GOOGLE_INFO_PLIST }}
run: |
mkdir -p PhongKMMIC/Configurations/Plists/GoogleService/Production
echo $IOS_GOOGLE_SERVICE_INFO_PRODUCTION | base64 --decode > ./PhongKMMIC/Configurations/Plists/GoogleService/Production/GoogleService-Info.plist
- name: Cache Gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/modules-*
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Generate KMM frameworks for Cocoapods
run: |
cd ..
./gradlew generateDummyFramework
- name: Cache Pods
uses: actions/cache@v3
id: cocoapodCache
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install Pods Dependencies
run: bundle exec pod install
- name: Build and Test
run: bundle exec fastlane buildAndTest
- name: Sync AppStore Production Signing
env:
CI: true
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
run: bundle exec fastlane syncAppStoreCodeSigning
- name: Build and Upload to AppStore Connect
env:
APPSTORE_CONNECT_API_KEY: ${{ secrets.APPSTORE_CONNECT_API_KEY }}
API_KEY_ID: ${{ secrets.APPSTORE_CONNECT_API_KEY_ID }}
ISSUER_ID: ${{ secrets.APPSTORE_CONNECT_ISSUER_ID }}
FIREBASE_CLI_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
run: bundle exec fastlane buildAndUploadToAppStore