6
6
jobs :
7
7
buildHybridAppAndroid :
8
8
name : Build HybridApp Android
9
- runs-on : macos-15-xlarge
9
+ runs-on : ubuntu-latest-xl
10
10
steps :
11
11
- name : Checkout
12
12
uses : actions/checkout@v4
@@ -30,23 +30,65 @@ jobs:
30
30
with :
31
31
IS_HYBRID_BUILD : ' true'
32
32
33
+ - name : Run grunt build
34
+ run : |
35
+ cd Mobile-Expensify
36
+ npm run grunt:build:shared
37
+
38
+ - name : Setup Java
39
+ uses : actions/setup-java@v4
40
+ with :
41
+ distribution : ' oracle'
42
+ java-version : ' 17'
43
+
44
+ - name : Setup Ruby
45
+ uses : ruby/setup-ruby@v1.190.0
46
+ with :
47
+ bundler-cache : true
48
+
49
+ - name : Install New Expensify Gems
50
+ run : bundle install
51
+
52
+ - name : Install 1Password CLI
53
+ uses : 1password/install-cli-action@v1
54
+
55
+ - name : Load files from 1Password
56
+ env :
57
+ OP_SERVICE_ACCOUNT_TOKEN : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
58
+ run : |
59
+ op document get --output ./upload-key.keystore upload-key.keystore
60
+ op document get --output ./android-fastlane-json-key.json android-fastlane-json-key.json
61
+ # Copy the keystore to the Android directory for Fullstory
62
+ cp ./upload-key.keystore Mobile-Expensify/Android
63
+
64
+ - name : Load Android upload keystore credentials from 1Password
65
+ id : load-credentials
66
+ uses : 1password/load-secrets-action@v2
67
+ with :
68
+ export-env : false
69
+ env :
70
+ OP_SERVICE_ACCOUNT_TOKEN : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
71
+ ANDROID_UPLOAD_KEYSTORE_PASSWORD : op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEYSTORE_PASSWORD
72
+ ANDROID_UPLOAD_KEYSTORE_ALIAS : op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEYSTORE_ALIAS
73
+ ANDROID_UPLOAD_KEY_PASSWORD : op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEY_PASSWORD
74
+
33
75
- name : Build Android Release
34
76
working-directory : Mobile-Expensify/Android
35
77
run : |
36
- if ! ./gradlew --profile assembleRelease
37
- then
38
- echo "❌ Android HybridApp failed to build: Please reach out to Contributor+ and/or Expensify engineers for help in #expensify-open-source to resolve."
39
- exit 1
40
- else
41
- echo "✅ Build succeeded. Printing Gradle profile report:"
42
- # Print the latest generated profile report
43
- PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f)
44
- cat "$PROFILE_REPORT"
45
- fi
78
+ ./gradlew --profile assembleRelease \
79
+ -Pandroid.injected.signing.store.file="./upload-key.keystore" \
80
+ -Pandroid.injected.signing.store.password=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_PASSWORD }} \
81
+ -Pandroid.injected.signing.key.alias=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_ALIAS }} \
82
+ -Pandroid.injected.signing.key.password=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEY_PASSWORD }}
83
+
84
+ echo "Printing Gradle profile report:"
85
+ # Print the latest generated profile report
86
+ PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f)
87
+ cat "$PROFILE_REPORT"
46
88
47
89
buildStandaloneAndroid :
48
90
name : Build Standalone Android
49
- runs-on : macos-15-xlarge
91
+ runs-on : ubuntu-latest-xl
50
92
steps :
51
93
- name : Checkout
52
94
uses : actions/checkout@v4
@@ -62,16 +104,19 @@ jobs:
62
104
with :
63
105
IS_HYBRID_BUILD : ' false'
64
106
107
+ - name : Decrypt keystore to sign the APK/AAB
108
+ run : gpg --batch --yes --decrypt --passphrase="${{ secrets.LARGE_SECRET_PASSPHRASE }}" --output my-upload-key.keystore my-upload-key.keystore.gpg
109
+ working-directory : android/app
110
+
65
111
- name : Build Android Release
66
112
working-directory : android
113
+ env :
114
+ MYAPP_UPLOAD_STORE_PASSWORD : ${{ secrets.MYAPP_UPLOAD_STORE_PASSWORD }}
115
+ MYAPP_UPLOAD_KEY_PASSWORD : ${{ secrets.MYAPP_UPLOAD_KEY_PASSWORD }}
67
116
run : |
68
- if ! ./gradlew --profile assembleProductionRelease
69
- then
70
- echo "❌ Android Standalone failed to build: Please reach out to Contributor+ and/or Expensify engineers for help in #expensify-open-source to resolve."
71
- exit 1
72
- else
73
- echo "✅ Build succeeded. Printing Gradle profile report:"
74
- # Print the latest generated profile report
75
- PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f)
76
- cat "$PROFILE_REPORT"
77
- fi
117
+ ./gradlew --profile assembleProductionRelease
118
+
119
+ echo "Printing Gradle profile report:"
120
+ # Print the latest generated profile report
121
+ PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f)
122
+ cat "$PROFILE_REPORT"
0 commit comments