11name : ' Build Android'
22description : ' Builds Android app AAB and uploads manifest and AAB'
33inputs :
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 :
2911 description : ' Bugsnag API key for official build'
@@ -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,36 +81,16 @@ 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 bundleOfficialRelease
12685 shell : bash
12786
12887 - name : Upload sourcemaps/NDK symbols to Bugsnag
12988 run : |
130- if [[ "${{ inputs.type }}" == "official" ]]; then
131- pnpm bugsnag:upload-android --variant officialRelease --app-manifest android/app/build/intermediates/merged_manifests/officialRelease/processOfficialReleaseManifest/AndroidManifest.xml
132- pnpm exec bugsnag-cli upload android-aab android/app/build/outputs/bundle/officialRelease/app-official-release.aab
133- fi
134- if [[ "${{ inputs.type }}" == "experimental" ]]; then
135- pnpm bugsnag:upload-android --variant experimentalRelease --app-manifest android/app/build/intermediates/merged_manifests/experimentalRelease/processExperimentalReleaseManifest/AndroidManifest.xml
136- pnpm exec bugsnag-cli upload android-aab android/app/build/outputs/bundle/experimentalRelease/app-experimental-release.aab
137- fi
89+ pnpm bugsnag:upload-android --variant officialRelease --app-manifest android/app/build/intermediates/merged_manifests/officialRelease/processOfficialReleaseManifest/AndroidManifest.xml
90+ pnpm exec bugsnag-cli upload android-aab android/app/build/outputs/bundle/officialRelease/app-official-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-
14793 - name : Upload Official AAB
148- if : ${{ inputs.type == 'official' }}
14994 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
15095 with :
15196 name : android-aab-official
0 commit comments