-
Notifications
You must be signed in to change notification settings - Fork 88
200 lines (194 loc) · 7.51 KB
/
internal-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
189
190
191
192
193
194
195
196
197
198
199
200
name: Internal Build [Android & IOS]
run-name: ${{ inputs.buildname }}
on:
workflow_dispatch:
inputs:
release:
description: 'Internal/Beta'
required: true
default: 'internal'
type: choice
options:
- internal
- beta
buildFor:
description: 'Build'
required: true
default: 'Both[Android and IOS]'
type: choice
options:
- Both[Android and IOS]
- Android
- IOS
buildName:
description: 'Build App For'
required: true
default: 'Sprint-x/QA-Inji/Release-x.x.x'
type: string
mimotoBackendServiceUrl:
description: 'Mimoto backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
esignetBackendServiceUrl:
description: 'Esignet backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
injiFlavor:
description: 'Select Inji flavor'
required: true
default: 'Inji'
type: choice
options:
- residentapp
- inji
- collab
- synergy
- mec
internal-testers:
description: 'Internal Testers Group'
required: true
default: 'QA-Triple'
type: choice
options:
- Dev-testing
- MEC
- QA
- MOSIP-Collab
- MOSIP-Dev-testing
theme:
description: 'Application Theme'
required: true
default: 'orange'
type: choice
options:
- orange
- purple
allow_env_edit:
description: 'Edit ENV'
required: true
default: 'true'
type: choice
options:
- false
- true
liveness_detection:
description: 'Detect Liveness'
required: true
default: 'false'
type: choice
options:
- false
- true
jobs:
set-client-id:
runs-on: ubuntu-latest
outputs:
CLIENT_ID: ${{ steps.client-id.outputs.CLIENT_ID }}
steps:
- uses: actions/[email protected]
- name: Set Google client id
id: client-id
run: |
cd .github/scripts
./set-google-clientid.sh "$INJI_FLAVOR"
env:
INJI_FLAVOR: ${{ github.event.inputs.injiFlavor }}
build-android:
if: ${{ inputs.buildFor == 'Both[Android and IOS]' || inputs.buildFor == 'Android'}}
needs: set-client-id
uses: mosip/kattu/.github/workflows/android-publish.yml@master
with:
RELEASE: ${{ inputs.release }}
NODE_VERSION: '18.x'
RELEASE_KEYSTORE_ALIAS: androidreleasekey
MIMOTO_HOST: ${{ inputs.mimotoBackendServiceUrl }}
ESIGNET_HOST: ${{ inputs.esignetBackendServiceUrl }}
APPLICATION_THEME: ${{ inputs.theme }}
BUILD_DESCRIPTION: ${{ inputs.buildName }}
ALLOW_ENV_EDIT: ${{ inputs.allow_env_edit }}
LIVENESS_DETECTION: ${{ inputs.liveness_detection }}
APP_FLAVOR: ${{ inputs.injiFlavor }}
SERVICE_LOCATION: '.'
ANDROID_SERVICE_LOCATION: 'android'
BUILD_SCRIPT_LOCATION: 'scripts'
SCRIPT_NAME: "./${{ inputs.release }}.sh"
ANDROID_ARTIFACT_NAME: ${{ inputs.buildname }}
ANDROID_ARTIFACT_PATH: "android/app/build/outputs/apk/${{ inputs.injiFlavor }}/release/Inji_universal.apk"
secrets:
ANDROID_KEYSTORE_FILE: ${{ secrets.INJI_ANDROID_RELEASE_KEYSTORE }}
RELEASE_KEYSTORE_PASSWORD: '${{ secrets.INJI_ANDROID_RELEASE_STOREPASS }}'
INJI_ANDROID_PLAY_STORE_CONFIG_JSON: ${{ secrets.INJI_ANDROID_PLAY_STORE_CONFIG_JSON }}
SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK_INJI_TEAM }}'
GOOGLE_ANDROID_CLIENT_ID: ${{ secrets[needs.set-client-id.outputs.CLIENT_ID] }}
build-android-beta:
if: ${{ inputs.release == 'beta' && (inputs.buildFor == 'Both[Android and IOS]' || inputs.buildFor == 'Android') }}
uses: mosip/kattu/.github/workflows/android-publish.yml@master
with:
RELEASE: ${{ inputs.release }}
NODE_VERSION: '18.x'
RELEASE_KEYSTORE_ALIAS: androidreleasekey
MIMOTO_HOST: ${{ inputs.mimotoBackendServiceUrl }}
ESIGNET_HOST: ${{ inputs.esignetBackendServiceUrl }}
APPLICATION_THEME: ${{ inputs.theme }}
BUILD_DESCRIPTION: ${{ inputs.buildName }}
ALLOW_ENV_EDIT: ${{ inputs.allow_env_edit }}
LIVENESS_DETECTION: ${{ inputs.liveness_detection }}
APP_FLAVOR: ${{ inputs.injiFlavor }}
SERVICE_LOCATION: '.'
ANDROID_SERVICE_LOCATION: 'android'
BUILD_SCRIPT_LOCATION: 'scripts'
SCRIPT_NAME: "./${{ inputs.release }}.sh"
ANDROID_ARTIFACT_NAME: ${{ inputs.buildname }}
ANDROID_ARTIFACT_PATH: "android/app/build/outputs/apk/${{ inputs.injiFlavor }}/release/Inji_universal.apk"
secrets:
ANDROID_KEYSTORE_FILE: ${{ secrets.INJI_ANDROID_RELEASE_KEYSTORE }}
RELEASE_KEYSTORE_PASSWORD: '${{ secrets.INJI_ANDROID_RELEASE_STOREPASS }}'
INJI_ANDROID_PLAY_STORE_CONFIG_JSON: ${{ secrets.INJI_ANDROID_PLAY_STORE_CONFIG_JSON }}
SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK_INJI_TEAM }}'
GOOGLE_ANDROID_CLIENT_ID: ${{secrets.INJI_GOOGLE_CLIENT_ID}}
build-ios:
if: ${{ inputs.buildFor == 'Both[Android and IOS]' || inputs.buildFor == 'IOS'}}
uses: mosip/kattu/.github/workflows/ios-publish.yml@master
with:
NODE_VERSION: '18.x'
MIMOTO_HOST: ${{ inputs.mimotoBackendServiceUrl }}
ESIGNET_HOST: ${{ inputs.esignetBackendServiceUrl }}
APPLICATION_THEME: ${{ inputs.theme }}
TESTFLIGHT_BETA_APP_DESCRIPTION: ${{ inputs.buildName }}
ALLOW_ENV_EDIT: ${{ inputs.allow_env_edit }}
LIVENESS_DETECTION: ${{ inputs.liveness_detection }}
TESTFLIGHT_INTERNAL_TESTERS_GROUP: ${{ inputs.internal-testers }}
APP_FLAVOR: ${{ inputs.injiFlavor }}
SERVICE_LOCATION: '.'
IOS_SERVICE_LOCATION: 'ios'
SCRIPT_NAME: "fastlane beta"
IOS_ARTIFACT_NAME: "ios-artifacts"
IOS_ARTIFACT_PATH: "ios/fastlane/Inji_artifacts/"
secrets:
APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}'
DEVELOPER_APP_ID: '${{ secrets.IOS_INJI_DEVELOPER_APP_ID }}'
INJI_IOS_DEVELOPER_APP_IDENTIFIER: '${{ secrets.INJI_IOS_DEVELOPER_APP_IDENTIFIER }}'
INJI_IOS_DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.INJI_IOS_DEVELOPER_PORTAL_TEAM_ID }}'
INJI_IOS_FASTLANE_APPLE_ID: '${{ secrets.INJI_IOS_FASTLANE_APPLE_ID }}'
INJI_IOS_FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.INJI_IOS_FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}'
GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}'
INJI_IOS_PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.INJI_IOS_PROVISIONING_PROFILE_SPECIFIER }}'
INJI_IOS_TEMP_KEYCHAIN_PASSWORD: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_PASSWORD }}'
INJI_IOS_TEMP_KEYCHAIN_USER: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_USER }}'
APPLE_KEY_ID: '${{ secrets.APPLE_KEY_ID }}'
APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}'
APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}'
MATCH_PASSWORD: '${{ secrets.INJI_IOS_MATCH_PASSWORD }}'
SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK_INJI_TEAM }}'
# sonar-check:
# uses: mosip/kattu/.github/workflows/gradlew-sonar-analysis.yml@master
# with:
# SERVICE_LOCATION: '.'
# ANDROID_LOCATION: 'android'
# SONAR_ARGS: -Dsonarqube
# secrets:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SONAR_ORGANIZATION: ${{ secrets.ORG_KEY }}
# SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK_INJI_TEAM }}'