Skip to content

Commit 87a0070

Browse files
authored
chore: Merge 4.73.0 into single-server (#7367)
1 parent 9fc4903 commit 87a0070

393 files changed

Lines changed: 33100 additions & 21985 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
*.pbxproj -text
2+
pnpm-lock.yaml linguist-generated=true -diff
Lines changed: 20 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,26 @@
11
name: 'Build Android'
22
description: 'Builds Android app AAB and uploads manifest and AAB'
33
inputs:
4-
type:
5-
description: 'Build type: official or experimental'
6-
required: true
74
BUILD_VERSION:
85
description: 'Build version for build'
96
required: true
10-
BUGSNAG_KEY:
11-
description: 'Bugsnag API key for build'
12-
required: true
13-
KEYSTORE_EXPERIMENTAL_BASE64:
14-
description: 'Base64 encoded keystore for experimental build'
15-
required: true
16-
KEYSTORE_EXPERIMENTAL:
17-
description: 'Keystore file name for experimental build'
18-
required: true
19-
KEYSTORE_EXPERIMENTAL_PASSWORD:
20-
description: 'Keystore password for experimental build'
21-
required: true
22-
KEYSTORE_EXPERIMENTAL_ALIAS:
23-
description: 'Keystore alias for experimental build'
24-
required: true
257
GOOGLE_SERVICES_ANDROID:
26-
description: 'Google services JSON for experimental build'
8+
description: 'Google services JSON'
279
required: true
2810
BUGSNAG_KEY_OFFICIAL:
29-
description: 'Bugsnag API key for official build'
11+
description: 'Bugsnag API key'
3012
required: true
3113
KEYSTORE_OFFICIAL_BASE64:
32-
description: 'Base64 encoded keystore for official build'
14+
description: 'Base64 encoded keystore'
3315
required: true
3416
KEYSTORE_OFFICIAL:
35-
description: 'Keystore file name for official build'
17+
description: 'Keystore file name'
3618
required: true
3719
KEYSTORE_OFFICIAL_PASSWORD:
38-
description: 'Keystore password for official build'
20+
description: 'Keystore password'
3921
required: true
4022
KEYSTORE_OFFICIAL_ALIAS:
41-
description: 'Keystore alias for official build'
23+
description: 'Keystore alias'
4224
required: true
4325

4426
runs:
@@ -63,16 +45,11 @@ runs:
6345
key: gradle-${{ hashFiles('android/**.gradle*', 'android/**/gradle-wrapper.properties') }}
6446
restore-keys: |
6547
gradle-
66-
48+
6749
- name: Decode Keystore
6850
working-directory: android/app
6951
run: |
70-
if [[ "${{ inputs.type }}" == "experimental" ]]; then
71-
echo "${{ inputs.KEYSTORE_EXPERIMENTAL_BASE64 }}" | base64 -d > "${{ inputs.KEYSTORE_EXPERIMENTAL }}"
72-
fi
73-
if [[ "${{ inputs.type }}" == "official" ]]; then
74-
echo "${{ inputs.KEYSTORE_OFFICIAL_BASE64 }}" | base64 -d > "${{ inputs.KEYSTORE_OFFICIAL }}"
75-
fi
52+
echo "${{ inputs.KEYSTORE_OFFICIAL_BASE64 }}" | base64 -d > "${{ inputs.KEYSTORE_OFFICIAL }}"
7653
shell: bash
7754

7855
- name: Set gradle.properties
@@ -86,24 +63,12 @@ runs:
8663
echo -e "newArchEnabled=true" >> ./gradle.properties
8764
echo -e "hermesEnabled=true" >> ./gradle.properties
8865
echo -e "VERSIONCODE=${{ inputs.BUILD_VERSION }}" >> ./gradle.properties
89-
90-
if [[ "${{ inputs.type }}" == "experimental" ]]; then
91-
echo -e "APPLICATION_ID=chat.rocket.reactnative" >> ./gradle.properties
92-
echo -e "BugsnagAPIKey=${{ inputs.BUGSNAG_KEY }}" >> ./gradle.properties
93-
echo -e "KEYSTORE=${{ inputs.KEYSTORE_EXPERIMENTAL }}" >> ./gradle.properties
94-
echo -e 'KEYSTORE_PASSWORD=${{ inputs.KEYSTORE_EXPERIMENTAL_PASSWORD }}' >> ./gradle.properties
95-
echo -e "KEY_ALIAS=${{ inputs.KEYSTORE_EXPERIMENTAL_ALIAS }}" >> ./gradle.properties
96-
echo -e 'KEY_PASSWORD=${{ inputs.KEYSTORE_EXPERIMENTAL_PASSWORD }}' >> ./gradle.properties
97-
fi
98-
99-
if [[ "${{ inputs.type }}" == "official" ]]; then
100-
echo -e "APPLICATION_ID=chat.rocket.android" >> ./gradle.properties
101-
echo -e "BugsnagAPIKey=${{ inputs.BUGSNAG_KEY_OFFICIAL }}" >> ./gradle.properties
102-
echo -e "KEYSTORE=${{ inputs.KEYSTORE_OFFICIAL }}" >> ./gradle.properties
103-
echo -e 'KEYSTORE_PASSWORD=${{ inputs.KEYSTORE_OFFICIAL_PASSWORD }}' >> ./gradle.properties
104-
echo -e "KEY_ALIAS=${{ inputs.KEYSTORE_OFFICIAL_ALIAS }}" >> ./gradle.properties
105-
echo -e 'KEY_PASSWORD=${{ inputs.KEYSTORE_OFFICIAL_PASSWORD }}' >> ./gradle.properties
106-
fi
66+
echo -e "APPLICATION_ID=chat.rocket.android" >> ./gradle.properties
67+
echo -e "BugsnagAPIKey=${{ inputs.BUGSNAG_KEY_OFFICIAL }}" >> ./gradle.properties
68+
echo -e "KEYSTORE=${{ inputs.KEYSTORE_OFFICIAL }}" >> ./gradle.properties
69+
echo -e 'KEYSTORE_PASSWORD=${{ inputs.KEYSTORE_OFFICIAL_PASSWORD }}' >> ./gradle.properties
70+
echo -e "KEY_ALIAS=${{ inputs.KEYSTORE_OFFICIAL_ALIAS }}" >> ./gradle.properties
71+
echo -e 'KEY_PASSWORD=${{ inputs.KEYSTORE_OFFICIAL_PASSWORD }}' >> ./gradle.properties
10772
shell: bash
10873

10974
- name: Set Google Services JSON
@@ -116,37 +81,17 @@ runs:
11681

11782
- name: Build Android Release AAB
11883
working-directory: android
119-
run: |
120-
if [[ "${{ inputs.type }}" == "experimental" ]]; then
121-
./gradlew bundleExperimentalRelease
122-
fi
123-
if [[ "${{ inputs.type }}" == "official" ]]; then
124-
./gradlew bundleOfficialRelease
125-
fi
84+
run: ./gradlew bundleRelease
12685
shell: bash
12786

12887
- name: Upload sourcemaps/NDK symbols to Bugsnag
12988
run: |
130-
if [[ "${{ inputs.type }}" == "official" ]]; then
131-
yarn bugsnag:upload-android --variant officialRelease --app-manifest android/app/build/intermediates/merged_manifests/officialRelease/processOfficialReleaseManifest/AndroidManifest.xml
132-
yarn bugsnag-cli upload android-aab android/app/build/outputs/bundle/officialRelease/app-official-release.aab
133-
fi
134-
if [[ "${{ inputs.type }}" == "experimental" ]]; then
135-
yarn bugsnag:upload-android --variant experimentalRelease --app-manifest android/app/build/intermediates/merged_manifests/experimentalRelease/processExperimentalReleaseManifest/AndroidManifest.xml
136-
yarn bugsnag-cli upload android-aab android/app/build/outputs/bundle/experimentalRelease/app-experimental-release.aab
137-
fi
89+
pnpm bugsnag:upload-android --variant release --app-manifest android/app/build/intermediates/merged_manifests/release/processReleaseManifest/AndroidManifest.xml
90+
pnpm exec bugsnag-cli upload android-aab android/app/build/outputs/bundle/release/app-release.aab
13891
shell: bash
13992

140-
- name: Upload Experimental AAB
141-
if: ${{ inputs.type == 'experimental' }}
142-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
143-
with:
144-
name: android-aab-experimental
145-
path: android/app/build/outputs/bundle/experimentalRelease/app-experimental-release.aab
146-
147-
- name: Upload Official AAB
148-
if: ${{ inputs.type == 'official' }}
93+
- name: Upload AAB
14994
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
15095
with:
151-
name: android-aab-official
152-
path: android/app/build/outputs/bundle/officialRelease/app-official-release.aab
96+
name: android-aab
97+
path: android/app/build/outputs/bundle/release/app-release.aab
Lines changed: 11 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
name: 'Build iOS'
22
description: 'Build iOS app'
33
inputs:
4-
type:
5-
description: 'Build type: official or experimental'
6-
required: true
74
BUILD_VERSION:
85
description: 'Build version'
96
required: true
107
APP_STORE_CONNECT_API_KEY_BASE64:
118
description: 'Base64 encoded App Store Connect API Key'
129
required: true
13-
BUGSNAG_KEY:
14-
description: 'Bugsnag API Key'
15-
required: true
1610
MATCH_KEYCHAIN_NAME:
1711
description: 'Match Keychain Name'
1812
required: true
@@ -32,13 +26,10 @@ inputs:
3226
description: 'Fastlane Repo PAT'
3327
required: true
3428
BUGSNAG_KEY_OFFICIAL:
35-
description: 'Bugsnag API Key Official'
29+
description: 'Bugsnag API Key'
3630
required: true
3731
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'
32+
description: 'Google service file'
4233
required: true
4334

4435
runs:
@@ -71,9 +62,9 @@ runs:
7162
restore-keys: |
7263
pods-v1-
7364
74-
- name: pod install
65+
- name: pod install
7566
run: |
76-
yarn pod-install
67+
pnpm pod-install
7768
shell: bash
7869

7970
- name: Decode p8
@@ -85,43 +76,21 @@ runs:
8576
working-directory: ios
8677
run: |
8778
agvtool new-version -all ${{ inputs.BUILD_VERSION }}
88-
if [[ ${{ inputs.type }} == "official" ]]; then
89-
/usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey ${{ inputs.BUGSNAG_KEY_OFFICIAL }}" ./RocketChatRN/Info.plist
90-
/usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey ${{ inputs.BUGSNAG_KEY_OFFICIAL }}" ./ShareRocketChatRN/Info.plist
91-
/usr/libexec/PlistBuddy -c "Set IS_OFFICIAL YES" ./RocketChatRN/Info.plist
92-
/usr/libexec/PlistBuddy -c "Set IS_OFFICIAL YES" ./ShareRocketChatRN/Info.plist
93-
/usr/libexec/PlistBuddy -c "Set IS_OFFICIAL YES" ./NotificationService/Info.plist
94-
fi
95-
if [[ ${{ inputs.type }} == "experimental" ]]; then
96-
/usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey ${{ inputs.BUGSNAG_KEY }}" ./RocketChatRN/Info.plist
97-
/usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey ${{ inputs.BUGSNAG_KEY }}" ./ShareRocketChatRN/Info.plist
98-
/usr/libexec/PlistBuddy -c "Set IS_OFFICIAL NO" ./RocketChatRN/Info.plist
99-
/usr/libexec/PlistBuddy -c "Set IS_OFFICIAL NO" ./ShareRocketChatRN/Info.plist
100-
/usr/libexec/PlistBuddy -c "Set IS_OFFICIAL NO" ./NotificationService/Info.plist
101-
fi
79+
/usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey ${{ inputs.BUGSNAG_KEY_OFFICIAL }}" ./RocketChatRN/Info.plist
80+
/usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey ${{ inputs.BUGSNAG_KEY_OFFICIAL }}" ./ShareRocketChatRN/Info.plist
10281
shell: bash
10382

10483
- name: Set Google Services
10584
working-directory: ios
10685
run: |
10786
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
87+
echo ${{ inputs.GOOGLE_SERVICES_IOS }} | base64 --decode > GoogleService-Info.plist
11388
fi
11489
shell: bash
11590

11691
- name: Build iOS app
11792
working-directory: ios
118-
run: |
119-
if [[ ${{ inputs.type }} == "official" ]]; then
120-
bundle exec fastlane ios build_official
121-
fi
122-
if [[ ${{ inputs.type }} == "experimental" ]]; then
123-
bundle exec fastlane ios build_experimental
124-
fi
93+
run: bundle exec fastlane ios build
12594
env:
12695
MATCH_KEYCHAIN_NAME: ${{ inputs.MATCH_KEYCHAIN_NAME }}
12796
MATCH_KEYCHAIN_PASSWORD: ${{ inputs.MATCH_KEYCHAIN_PASSWORD }}
@@ -133,42 +102,18 @@ runs:
133102

134103
- name: Upload IPA artifact
135104
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
136-
if: ${{ inputs.type == 'experimental' }}
137105
with:
138-
name: ios-build-experimental
106+
name: ios-build
139107
path: ios/Rocket.Chat.ipa
140108

141-
- name: Upload IPA artifact
142-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
143-
if: ${{ inputs.type == 'official' }}
144-
with:
145-
name: ios-build-official
146-
path: ios/Rocket.Chat.ipa
147-
148-
- name: Upload Rocket.Chat.app.dSYM.zip
149-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
150-
if: ${{ inputs.type == 'experimental' }}
151-
with:
152-
name: ios-build-experimental-dSYM
153-
path: ios/Rocket.Chat.app.dSYM.zip
154-
155109
- name: Upload Rocket.Chat.app.dSYM.zip
156110
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
157-
if: ${{ inputs.type == 'official' }}
158111
with:
159-
name: ios-build-official-dSYM
112+
name: ios-build-dSYM
160113
path: ios/Rocket.Chat.app.dSYM.zip
161114

162115
- name: Upload RocketChatRN/Info.plist
163116
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
164-
if: ${{ inputs.type == 'experimental' }}
165-
with:
166-
name: ios-build-experimental-info-plist
167-
path: ios/RocketChatRN/Info.plist
168-
169-
- name: Upload RocketChatRN/Info.plist
170-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
171-
if: ${{ inputs.type == 'official' }}
172117
with:
173-
name: ios-build-official-info-plist
118+
name: ios-build-info-plist
174119
path: ios/RocketChatRN/Info.plist
Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
name: Setup Node
2-
description: Setup node and cache node_modules
2+
description: Setup node and pnpm via corepack, with pnpm store cache
33
runs:
44
using: "composite"
55
steps:
6+
- name: Enable corepack
7+
shell: bash
8+
run: corepack enable
9+
610
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
711
with:
812
node-version: 'lts/*'
9-
cache: 'yarn'
10-
11-
- name: Cache node_modules
12-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
13-
with:
14-
path: node_modules
15-
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock', 'patches/**') }}
16-
restore-keys: |
17-
${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock', 'patches/**') }}
13+
cache: 'pnpm'
1814

1915
- name: Install JS dependencies
2016
shell: bash
21-
run: yarn install --frozen-lockfile
17+
run: pnpm install --frozen-lockfile

.github/actions/upload-android/action.yml

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: 'Upload Android'
22
description: 'Downloads AAB + Manifest, uploads to Play Store'
33
inputs:
4-
type:
5-
description: 'Build type: official or experimental'
6-
required: true
74
FASTLANE_GOOGLE_SERVICE_ACCOUNT:
85
description: 'Google service account key for upload'
96
required: true
@@ -17,23 +14,15 @@ inputs:
1714
description: 'Trigger for build'
1815
required: true
1916
default: pr
20-
17+
2118
runs:
2219
using: "composite"
2320
steps:
24-
- name: Download Experimental AAB
25-
if: ${{ inputs.type == 'experimental' }}
26-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
27-
with:
28-
name: android-aab-experimental
29-
path: android/app/build/outputs/bundle/experimentalRelease/
30-
31-
- name: Download Official AAB
32-
if: ${{ inputs.type == 'official' }}
21+
- name: Download AAB
3322
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
3423
with:
35-
name: android-aab-official
36-
path: android/app/build/outputs/bundle/officialRelease/
24+
name: android-aab
25+
path: android/app/build/outputs/bundle/release/
3726

3827
- name: Set up Ruby and Bundler
3928
uses: ruby/setup-ruby@7372622e62b60b3cb750dcd2b9e32c247ffec26a # v1.302.0
@@ -72,34 +61,24 @@ runs:
7261
working-directory: android
7362
run: |
7463
if [[ ${{ inputs.trigger }} == "pr" ]]; then
75-
bundle exec fastlane android beta official:${{ inputs.type == 'official' }}
64+
bundle exec fastlane android beta
7665
fi
77-
if [[ ${{ inputs.trigger }} == "develop" ]] && [[ ${{ inputs.type }} == 'experimental' ]]; then
78-
bundle exec fastlane android experimental_production
79-
fi
80-
if [[ ${{ inputs.trigger }} == "develop" ]] && [[ ${{ inputs.type }} == 'official' ]]; then
81-
bundle exec fastlane android official_open_testing
66+
if [[ ${{ inputs.trigger }} == "develop" ]]; then
67+
bundle exec fastlane android open_testing
8268
fi
8369
shell: bash
84-
70+
8571
- name: Leave a comment on PR
8672
if: ${{ inputs.trigger == 'pr' }}
8773
env:
8874
GH_TOKEN: ${{ inputs.GITHUB_TOKEN }}
8975
PR_NUMBER: ${{ github.event.pull_request.number }}
90-
BUILD_TYPE: ${{ inputs.type }}
9176
BUILD_VERSION: ${{ inputs.BUILD_VERSION }}
9277
run: |
93-
if [[ "$BUILD_TYPE" == "official" ]]; then
94-
app_name="Rocket.Chat"
95-
else
96-
app_name="Rocket.Chat Experimental"
97-
fi
98-
9978
gradle_file="android/app/build.gradle"
10079
VERSION_NAME=$(grep versionName $gradle_file | head -n 1 | sed -E 's/.*versionName[[:space:]]+"([^"]+)".*/\1/')
10180
102-
version_info="$app_name $VERSION_NAME.$BUILD_VERSION"
81+
version_info="Rocket.Chat $VERSION_NAME.$BUILD_VERSION"
10382
10483
message="**Android Build Available**"$'\n\n'"$version_info"
10584

0 commit comments

Comments
 (0)