File tree Expand file tree Collapse file tree 7 files changed +83
-13
lines changed
Expand file tree Collapse file tree 7 files changed +83
-13
lines changed Original file line number Diff line number Diff line change @@ -34,10 +34,22 @@ inputs:
3434 BUGSNAG_KEY_OFFICIAL :
3535 description : ' Bugsnag API Key Official'
3636 required : true
37+ GOOGLE_SERVICES_IOS :
38+ description : ' Google service file for official version'
39+ required : true
40+ GOOGLE_SERVICES_IOS_EXPERIMENTAL :
41+ description : ' Google service file for experimental version'
42+ required : true
3743
3844runs :
3945 using : " composite"
4046 steps :
47+ - name : Remove simulator and its cache
48+ run : |
49+ xcrun simctl delete all
50+ sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/*
51+ shell : bash
52+
4153 - name : Set up Xcode
4254 uses : maxim-lobanov/setup-xcode@v1
4355 with :
@@ -89,6 +101,18 @@ runs:
89101 fi
90102 shell : bash
91103
104+ - name : Set Google Services
105+ working-directory : ios
106+ run : |
107+ if [[ $APP_STORE_CONNECT_API_KEY_BASE64 ]]; then
108+ if [[ ${{ inputs.type }} == "official" ]]; then
109+ echo ${{ inputs.GOOGLE_SERVICES_IOS }} | base64 --decode > GoogleService-Info.plist
110+ else
111+ echo ${{ inputs.GOOGLE_SERVICES_IOS_EXPERIMENTAL }} | base64 --decode > GoogleService-Info.plist
112+ fi
113+ fi
114+ shell : bash
115+
92116 - name : Build iOS app
93117 working-directory : ios
94118 run : |
@@ -147,4 +171,4 @@ runs:
147171 if : ${{ inputs.type == 'official' }}
148172 with :
149173 name : ios-build-official-info-plist
150- path : ios/RocketChatRN/Info.plist
174+ path : ios/RocketChatRN/Info.plist
Original file line number Diff line number Diff line change 1+ name : Fetch supported versions
2+ description : Fetch supported versions from Cloud
3+ inputs :
4+ build_name :
5+ description : Name of the build
6+ required : true
7+
8+ runs :
9+ using : " composite"
10+ steps :
11+ - name : Fetch supported versions from Cloud
12+ shell : bash
13+ run : sh ./scripts/fetch-supported-versions.sh
14+
15+ - name : Update supported versions
16+ uses : actions/upload-artifact@v4
17+ with :
18+ name : supported-versions-${{ inputs.build_name }}
19+ path : ./app-supportedversions.json
20+
Original file line number Diff line number Diff line change 7878 if : ${{ inputs.os == 'ios' }}
7979 shell : bash
8080 run : |
81- VERSIONCODE=$(bundle exec fastlane ios get_testflight_version | grep 'VERSIONCODE=' | cut -d '=' -f2)
81+ VERSIONCODE=$(bundle exec fastlane ios get_testflight_version official:${{ inputs.official }} | grep 'VERSIONCODE=' | cut -d '=' -f2)
8282 echo "LATEST_VERSIONCODE=$VERSIONCODE" >> $GITHUB_OUTPUT
8383 working-directory : ios
8484 env :
9494 if : ${{ inputs.os == 'android' }}
9595 shell : bash
9696 run : |
97- VERSIONCODE=$(bundle exec fastlane android version_code | grep 'VERSIONCODE=' | cut -d '=' -f2)
97+ VERSIONCODE=$(bundle exec fastlane android version_code official:${{ inputs.official }} | grep 'VERSIONCODE=' | cut -d '=' -f2)
9898 echo "LATEST_VERSIONCODE=$VERSIONCODE" >> $GITHUB_OUTPUT
9999 working-directory : android
100100
@@ -111,4 +111,4 @@ runs:
111111 echo "VERSIONCODE=$VERSIONCODE" >> $GITHUB_OUTPUT
112112
113113 echo "### 📦 Version Code Generated" >> $GITHUB_STEP_SUMMARY
114- echo "\`Version Code: $VERSIONCODE\`" >> $GITHUB_STEP_SUMMARY
114+ echo "\`Version Code: $VERSIONCODE\`" >> $GITHUB_STEP_SUMMARY
Original file line number Diff line number Diff line change 3333
3434 - name : Checkout and Setup Node
3535 uses : ./.github/actions/setup-node
36+
37+ - name : Fetch supported versions from Cloud
38+ uses : ./.github/actions/fetch-supported-versions
39+ with :
40+ build_name : ' android-experimental'
3641
3742 - name : Generate Version Code
3843 id : version
6166 needs : [build-android]
6267 if : ${{ inputs.trigger == 'pr' }}
6368 environment : upload_experimental_android
69+ outputs :
70+ VERSIONCODE : ${{ needs.build-android.outputs.VERSIONCODE }}
6471 steps :
6572 - run : echo "Waiting for manual approval..."
6673
8390 trigger : ${{ inputs.trigger }}
8491 FASTLANE_GOOGLE_SERVICE_ACCOUNT : ${{ secrets.FASTLANE_GOOGLE_SERVICE_ACCOUNT }}
8592 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
86- VERSIONCODE : ${{ needs.build-android .outputs.VERSIONCODE }}
93+ VERSIONCODE : ${{ needs.upload-hold .outputs.VERSIONCODE }}
8794
8895 upload-internal :
8996 name : Internal Sharing
@@ -103,4 +110,4 @@ jobs:
103110 type : experimental
104111 FASTLANE_GOOGLE_SERVICE_ACCOUNT : ${{ secrets.FASTLANE_GOOGLE_SERVICE_ACCOUNT }}
105112 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
106- VERSIONCODE : ${{ needs.build-android.outputs.VERSIONCODE }}
113+ VERSIONCODE : ${{ needs.build-android.outputs.VERSIONCODE }}
Original file line number Diff line number Diff line change 3232 - name : Checkout and Setup Node
3333 uses : ./.github/actions/setup-node
3434
35+ - name : Fetch supported versions from Cloud
36+ uses : ./.github/actions/fetch-supported-versions
37+ with :
38+ build_name : ' ios-experimental'
39+
3540 - name : Generate Version Code
3641 id : version
3742 uses : ./.github/actions/generate-version-code
4853
4954 - name : Build iOS
5055 uses : ./.github/actions/build-ios
51- timeout-minutes : 40
56+ timeout-minutes : 60
5257 with :
5358 type : experimental
5459 MATCH_KEYCHAIN_NAME : ${{ secrets.MATCH_KEYCHAIN_NAME }}
5964 FASTLANE_REPO_PAT : ${{ secrets.FASTLANE_REPO_PAT }}
6065 BUGSNAG_KEY : ${{ secrets.BUGSNAG_KEY }}
6166 APP_STORE_CONNECT_API_KEY_BASE64 : ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
67+ GOOGLE_SERVICES_IOS : ${{ secrets.GOOGLE_SERVICES_IOS }}
68+ GOOGLE_SERVICES_IOS_EXPERIMENTAL : ${{ secrets.GOOGLE_SERVICES_IOS_EXPERIMENTAL }}
6269 VERSIONCODE : ${{ steps.version.outputs.VERSIONCODE }}
6370
6471 upload-ios :
8491 APP_STORE_CONNECT_API_KEY_ID : ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
8592 APP_STORE_CONNECT_API_KEY_ISSUER_ID : ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
8693 FASTLANE_REPO_PAT : ${{ secrets.FASTLANE_REPO_PAT }}
87- BUGSNAG_KEY : ${{ secrets.BUGSNAG_KEY }}
8894 APP_STORE_CONNECT_API_KEY_BASE64 : ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
89- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
95+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 3434 - name : Checkout and Setup Node
3535 uses : ./.github/actions/setup-node
3636
37+ - name : Fetch supported versions from Cloud
38+ uses : ./.github/actions/fetch-supported-versions
39+ with :
40+ build_name : ' android-official'
41+
3742 - name : Generate Version Code
3843 id : version
3944 uses : ./.github/actions/generate-version-code
6166 if : ${{ inputs.trigger == 'pr' }}
6267 environment : upload_official_android
6368 needs : [build-android]
69+ outputs :
70+ VERSIONCODE : ${{ needs.build-android.outputs.VERSIONCODE }}
6471 steps :
6572 - run : echo "Waiting for manual approval..."
6673
8087 trigger : ${{ inputs.trigger }}
8188 FASTLANE_GOOGLE_SERVICE_ACCOUNT : ${{ secrets.FASTLANE_GOOGLE_SERVICE_ACCOUNT }}
8289 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
83- VERSIONCODE : ${{ needs.build-android .outputs.VERSIONCODE }}
90+ VERSIONCODE : ${{ needs.upload-hold .outputs.VERSIONCODE }}
8491
8592 upload-internal :
8693 name : Internal Sharing
Original file line number Diff line number Diff line change 3232 - name : Checkout and Setup Node
3333 uses : ./.github/actions/setup-node
3434
35+ - name : Fetch supported versions from Cloud
36+ uses : ./.github/actions/fetch-supported-versions
37+ with :
38+ build_name : ' ios-official'
39+
3540 - name : Generate Version Code
3641 id : version
3742 uses : ./.github/actions/generate-version-code
4853
4954 - name : Build iOS
5055 uses : ./.github/actions/build-ios
51- timeout-minutes : 40
56+ timeout-minutes : 60
5257 with :
5358 type : official
5459 MATCH_KEYCHAIN_NAME : ${{ secrets.MATCH_KEYCHAIN_NAME }}
6065 BUGSNAG_KEY : ${{ secrets.BUGSNAG_KEY_OFFICIAL }}
6166 BUGSNAG_KEY_OFFICIAL : ${{ secrets.BUGSNAG_KEY_OFFICIAL }}
6267 APP_STORE_CONNECT_API_KEY_BASE64 : ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
68+ GOOGLE_SERVICES_IOS : ${{ secrets.GOOGLE_SERVICES_IOS }}
69+ GOOGLE_SERVICES_IOS_EXPERIMENTAL : ${{ secrets.GOOGLE_SERVICES_IOS_EXPERIMENTAL }}
6370 VERSIONCODE : ${{ steps.version.outputs.VERSIONCODE }}
6471
6572 upload-hold :
94101 APP_STORE_CONNECT_API_KEY_ID : ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
95102 APP_STORE_CONNECT_API_KEY_ISSUER_ID : ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
96103 FASTLANE_REPO_PAT : ${{ secrets.FASTLANE_REPO_PAT }}
97- BUGSNAG_KEY : ${{ secrets.BUGSNAG_KEY }}
98104 APP_STORE_CONNECT_API_KEY_BASE64 : ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
99- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
105+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments