-
Notifications
You must be signed in to change notification settings - Fork 0
188 lines (151 loc) · 5.22 KB
/
build.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
name: CI
on:
push:
branches:
- main
tags:
- v*
pull_request:
workflow_dispatch:
jobs:
code-style:
runs-on: macos-14
timeout-minutes: 60
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 18
- uses: gradle/gradle-build-action@v2
with:
cache-disabled: true
- name: Check convention plugins code style with Spotless
run: ./gradlew -p gradle/build-logic spotlessCheck
- name: Check code style with Spotless
run: ./gradlew spotlessCheck
- name: Check code style with Detekt
run: ./gradlew detektAll
- name: Run tests
run: ./gradlew test
android:
runs-on: macos-14
timeout-minutes: 60
env:
GOOGLE_PLAY_API_CREDENTIALS: ${{ secrets.GOOGLE_PLAY_API_CREDENTIALS }}
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 18
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: gradle/gradle-build-action@v2
with:
cache-disabled: true
- name: Generate android keystore
id: android_keystore
uses: timheuer/base64-to-file@v1.0.4
with:
fileName: keystore.jks
encodedString: ${{ secrets.KEYSTORE }}
- name: Create key.properties
run: |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > androidApp/key.properties
echo "storePassword=${{ secrets.ANDROID_SIGNING_STORE_PASSWORD }}" >> androidApp/key.properties
echo "keyPassword=${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}" >> androidApp/key.properties
echo "keyAlias=${{ secrets.ANDROID_SIGNING_KEY_ALIAS }}" >> androidApp/key.properties
- name: build prod
run: ./gradlew :androidApp:bundleRelease :androidApp:assembleRelease
env:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: Upload build outputs
if: always()
uses: actions/upload-artifact@v3
with:
name: android-build-outputs
path: androidApp/build/outputs/
ios:
runs-on: macos-14
timeout-minutes: 60
env:
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 60
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.GIT_PERSONAL_ACCESS_TOKEN }}
MATCH_PASSWORD: ${{ secrets.SYNC_SPHERE_GIT_PW }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
SYNC_SPHERE_BUILD_NUMBER: ${{ github.run_number }}
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 18
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: gradle/gradle-build-action@v2
with:
cache-disabled: true
- run: brew install swiftlint
- name: Build iOS application
run: bundle exec fastlane ios build
- name: Upload build outputs
if: always()
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ios-build-outputs
path: |
*.ipa
*.dSYM.zip
- name: Upload build logs
if: always()
uses: actions/upload-artifact@v3
with:
name: ios-logs
path: |
**/fastlane-buildlog
desktop:
runs-on: macos-14
timeout-minutes: 60
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 18
- uses: gradle/gradle-build-action@v2
with:
cache-disabled: true
# Developer ID Application
- name: Import signing certificate
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
p12-password: ${{ secrets.CERTIFICATES_PASSWORD }}
- name: Build Desktop App
run: ./gradlew :desktopApp:packageDmg -PmacOsAppStoreRelease=false
- name: Upload build outputs
if: always()
uses: actions/upload-artifact@v3
with:
name: desktop-build-binaries
path: desktopApp/build/compose/binaries/main