|
12 | 12 | installer_base_name: |
13 | 13 | required: true |
14 | 14 | type: string |
| 15 | + android_identity_seed: |
| 16 | + required: false |
| 17 | + type: string |
| 18 | + stealth_leakage_mode: |
| 19 | + description: "Optional stealth leakage scan mode, for example stealth or stealth-novpn" |
| 20 | + required: false |
| 21 | + type: string |
| 22 | + default: "" |
| 23 | + obfuscate_go: |
| 24 | + description: "Build Android Go/native libraries through garble" |
| 25 | + required: false |
| 26 | + type: boolean |
| 27 | + default: false |
| 28 | + secrets: |
| 29 | + GRADLE_PROPERTIES: |
| 30 | + required: true |
| 31 | + APP_ENV: |
| 32 | + required: true |
| 33 | + KEYSTORE: |
| 34 | + required: true |
| 35 | + STEALTH_GARBLE_SEED: |
| 36 | + required: false |
15 | 37 |
|
16 | 38 | jobs: |
17 | 39 | build-android: |
@@ -148,14 +170,58 @@ jobs: |
148 | 170 | env: |
149 | 171 | GOMOBILECACHE: ${{ env.GOMOBILECACHE }} |
150 | 172 |
|
| 173 | + - name: Run stealth manifest filter tests |
| 174 | + run: make stealth-manifest-filter-test |
| 175 | + |
| 176 | + - name: Install garble |
| 177 | + if: ${{ inputs.obfuscate_go }} |
| 178 | + run: make install-garble |
| 179 | + |
| 180 | + - name: Build Android obfuscated (APK + AAB) |
| 181 | + if: ${{ inputs.obfuscate_go }} |
| 182 | + run: make android-release-ci-obfuscated |
| 183 | + env: |
| 184 | + BUILD_TYPE: ${{ inputs.build_type }} |
| 185 | + VERSION: ${{ inputs.version }} |
| 186 | + INSTALLER_NAME: ${{ inputs.installer_base_name }} |
| 187 | + ANDROID_IDENTITY_SEED: ${{ inputs.android_identity_seed }} |
| 188 | + GOMOBILECACHE: ${{ env.GOMOBILECACHE }} |
| 189 | + STEALTH_GARBLE_SEED: ${{ secrets.STEALTH_GARBLE_SEED }} |
| 190 | + |
151 | 191 | - name: Build Android (APK + AAB) |
| 192 | + if: ${{ !inputs.obfuscate_go }} |
152 | 193 | run: make android-release-ci |
153 | 194 | env: |
154 | 195 | BUILD_TYPE: ${{ inputs.build_type }} |
155 | 196 | VERSION: ${{ inputs.version }} |
156 | 197 | INSTALLER_NAME: ${{ inputs.installer_base_name }} |
| 198 | + ANDROID_IDENTITY_SEED: ${{ inputs.android_identity_seed }} |
157 | 199 | GOMOBILECACHE: ${{ env.GOMOBILECACHE }} |
158 | 200 |
|
| 201 | + - name: Stealth leakage check |
| 202 | + id: stealth_leakage_check |
| 203 | + if: ${{ inputs.stealth_leakage_mode != '' }} |
| 204 | + shell: bash |
| 205 | + run: | |
| 206 | + set -o pipefail |
| 207 | + : > stealth-leakage-report.txt |
| 208 | + make stealth-leakage-check 2>&1 | tee stealth-leakage-report.txt |
| 209 | + env: |
| 210 | + STEALTH_LEAKAGE_MODE: ${{ inputs.stealth_leakage_mode }} |
| 211 | + STEALTH_LEAKAGE_MISSING_OK: "0" |
| 212 | + STEALTH_LEAKAGE_PATHS: >- |
| 213 | + ${{ inputs.installer_base_name }}${{ inputs.build_type != 'production' && format('-{0}', inputs.build_type) || '' }}.apk |
| 214 | + ${{ inputs.installer_base_name }}${{ inputs.build_type != 'production' && format('-{0}', inputs.build_type) || '' }}.aab |
| 215 | +
|
| 216 | + - name: Upload stealth leakage report |
| 217 | + if: ${{ always() && inputs.stealth_leakage_mode != '' && steps.stealth_leakage_check.outcome != 'skipped' }} |
| 218 | + uses: actions/upload-artifact@v4 |
| 219 | + with: |
| 220 | + name: stealth-leakage-report |
| 221 | + path: stealth-leakage-report.txt |
| 222 | + if-no-files-found: error |
| 223 | + retention-days: 14 |
| 224 | + |
159 | 225 | - name: Upload Android APK |
160 | 226 | uses: actions/upload-artifact@v4 |
161 | 227 | with: |
|
0 commit comments