-
Notifications
You must be signed in to change notification settings - Fork 6
149 lines (127 loc) · 5.83 KB
/
firebase-release.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
name: firebase-release
on:
push:
tags:
- 'firebase-*'
jobs:
distribute-android:
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.11.1'
- name: Setup firebase
run: |
curl -sL https://firebase.tools | bash
- name: Build Ionic
env:
NUMBERS_STORAGE_BASE_URL: ${{ secrets.NUMBERS_STORAGE_BASE_URL }}
NUMBERS_STORAGE_TRUSTED_CLIENT_KEY: ${{ secrets.NUMBERS_STORAGE_TRUSTED_CLIENT_KEY }}
NUMBERS_BUBBLE_DB_URL: ${{ secrets.NUMBERS_BUBBLE_DB_URL }}
NUMBERS_BUBBLE_IFRAME_URL: ${{ secrets.NUMBERS_BUBBLE_IFRAME_URL_QA_RELEASE }}
BUBBLE_API_URL: ${{ secrets.BUBBLE_API_URL }}
APPS_FLYER_DEV_KEY: ${{ secrets.APPS_FLYER_DEV_KEY }}
NUMBERS_PQINA_NPM_KEY: ${{ secrets.NUMBERS_PQINA_NPM_KEY }}
PIPEDREAM_DELETE_CAPTURE_ACCOUNT: ${{ secrets.PIPEDREAM_DELETE_CAPTURE_ACCOUNT }}
run: |
npm run preconfig.npmrc
npm install -g @ionic/cli
npm install --legacy-peer-deps
npm run build
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin' # https://github.com/actions/setup-java#supported-distributions
java-version: '17'
- name: Build Android release bundle (AAB) for Firebase
run: |
npx cap sync android
cd android/
./gradlew bundleRelease
- name: Sign release AAB
uses: r0adkll/sign-android-release@v1.0.4
with:
releaseDirectory: ./android/app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.ANDROID_KEYSTORE_FILE }}
alias: ${{ secrets.ANDROID_KEY_ALIAS }}
keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}
- name: Distribute Android App to Firebase
env:
APP_ID: ${{ secrets.FIREBASE_ANDROID_APP_ID }}
TEST_GROUPS: ${{ secrets.FIREBASE_TEST_GROUPS }}
GOOGLE_APPLICATION_CREDENTIALS: service_account.json
GOOGLE_APPLICATION_CREDENTIALS_CONTENT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }}
run: |
echo "$GOOGLE_APPLICATION_CREDENTIALS_CONTENT" > "$GOOGLE_APPLICATION_CREDENTIALS"
firebase appdistribution:distribute ./android/app/build/outputs/bundle/release/app-release.aab --app ${APP_ID} --groups "${TEST_GROUPS}"
distribute-ios:
runs-on: macos-14
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.11.1'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup firebase
run: |
curl -sL https://firebase.tools | bash
- name: Build Ionic
env:
NUMBERS_STORAGE_BASE_URL: ${{ secrets.NUMBERS_STORAGE_BASE_URL }}
NUMBERS_STORAGE_TRUSTED_CLIENT_KEY: ${{ secrets.NUMBERS_STORAGE_TRUSTED_CLIENT_KEY }}
NUMBERS_BUBBLE_DB_URL: ${{ secrets.NUMBERS_BUBBLE_DB_URL }}
NUMBERS_BUBBLE_IFRAME_URL: ${{ secrets.NUMBERS_BUBBLE_IFRAME_URL_QA_RELEASE }}
BUBBLE_API_URL: ${{ secrets.BUBBLE_API_URL }}
APPS_FLYER_DEV_KEY: ${{ secrets.APPS_FLYER_DEV_KEY }}
NUMBERS_PQINA_NPM_KEY: ${{ secrets.NUMBERS_PQINA_NPM_KEY }}
PIPEDREAM_DELETE_CAPTURE_ACCOUNT: ${{ secrets.PIPEDREAM_DELETE_CAPTURE_ACCOUNT }}
run: |
npm run preconfig.npmrc
npm install -g @ionic/cli
npm install --legacy-peer-deps
npm run build
- name: Import the Code-Signing PKCS12 Certificate
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
- name: Download provisioning profiles
uses: Apple-Actions/download-provisioning-profiles@v1
with:
bundle-id: io.numbersprotocol.capturelite
profile-type: 'IOS_APP_ADHOC'
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}
- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYYMMDDHHmmss
- name: Build iOS Xcode Archive
env:
PROVISIONING_PROFILE: ${{ secrets.FIREBASE_PROVISIONING_PROFILE_NAME }}
run: |
npx cap sync ios
sed -i '' "s/NumbersAppDistributionV6/${PROVISIONING_PROFILE}/g" ios/App/ExportOptions.plist
sed -i '' 's/app-store/ad-hoc/g' ios/App/ExportOptions.plist
xcodebuild archive -workspace ios/App/App.xcworkspace -scheme App -sdk iphoneos -configuration Release -archivePath build/App.xcarchive -showBuildTimingSummary CURRENT_PROJECT_VERSION=${{ steps.current-time.outputs.formattedTime }} PROVISIONING_PROFILE_SPECIFIER=${PROVISIONING_PROFILE} -allowProvisioningUpdates
- name: Export IPA from Xcode Archive
run: |
xcodebuild -exportArchive -archivePath build/App.xcarchive -exportPath build -exportOptionsPlist ios/App/ExportOptions.plist -allowProvisioningUpdates
- name: Distribute iOS App to Firebase
env:
APP_ID: ${{ secrets.FIREBASE_IOS_APP_ID }}
TEST_GROUPS: ${{ secrets.FIREBASE_TEST_GROUPS }}
GOOGLE_APPLICATION_CREDENTIALS: service_account.json
GOOGLE_APPLICATION_CREDENTIALS_CONTENT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }}
run: |
echo "$GOOGLE_APPLICATION_CREDENTIALS_CONTENT" > "$GOOGLE_APPLICATION_CREDENTIALS"
firebase appdistribution:distribute build/App.ipa --app ${APP_ID} --groups "${TEST_GROUPS}"