File tree Expand file tree Collapse file tree 5 files changed +88
-18
lines changed Expand file tree Collapse file tree 5 files changed +88
-18
lines changed Original file line number Diff line number Diff line change 11name : ' Build Android App'
22description : ' Builds the Android app using Fastlane'
3+ inputs :
4+ firebaseAPIKey :
5+ required : true
6+ keystorePath :
7+ required : true
8+ keystoreAlias :
9+ required : true
10+ keystorePassword :
11+ required : true
12+ keystoreKeyPassword :
13+ required : true
314
415runs :
516 using : ' composite'
@@ -26,11 +37,21 @@ runs:
2637 node-version-file : .nvmrc
2738
2839 - name : Build Android Library with Fastlane
29- run : cd android && fastlane android local
40+ run : |
41+ cd android
42+ fastlane android local
3043 shell : bash
44+ env :
45+ FIREBASE_API_KEY : ${{ inputs.firebaseAPIKey }}
46+ ANDROID_KEYSTORE_PATH : ${{ inputs.keystorePath }}
47+ ANDROID_KEYSTORE_PASSWORD : ${{ inputs.keystorePassword }}
48+ ANDROID_KEYSTORE_ALIAS : ${{ inputs.keystoreAlias }}
49+ ANDROID_KEYSTORE_KEY_PASSWORD : ${{ inputs.keystoreKeyPassword }}
3150
3251 - name : Copy Android Library to Shared Directory
33- run : mkdir -p ${{ github.workspace }}/artifacts/android && cp ./artifacts/app-production-debug.apk ${{ github.workspace }}/artifacts/android/app-production-debug.apk
52+ run : |
53+ mkdir -p ${{ github.workspace }}/artifacts/android
54+ cp ./artifacts/app-production-debug.apk ${{ github.workspace }}/artifacts/android/app-production-debug.apk
3455 shell : bash
3556
3657 - name : Upload apk to artifact
Original file line number Diff line number Diff line change 1+ name : " Build Android"
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ test :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v3
18+
19+ - name : Retrieve the secrets and decode it to a file
20+ run : |
21+ echo $UPLOAD_KEYSTORE_BASE64 | base64 --decode > ./android/keystores/upload.keystore
22+ echo $PLAY_STORE_CREDENTIALS_BASE64 | base64 --decode > ./android/fastlane/play-store-credentials.json
23+ shell : bash
24+
25+ - name : Build Android apk
26+ uses : ./.github/actions/build_android
27+ with :
28+ firebaseAPIKey : ${{ secrets.FIREBASE_API_KEY }}
29+ keystorePath : ${{ env.ANDROID_KEYSTORE_PATH }}
30+ keystoreAlias : ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
31+ keystorePassword : ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
32+ keystoreKeyPassword : ${{ secrets.ANDROID_KEYSTORE_KEY_PASSWORD }}
Original file line number Diff line number Diff line change 1818
1919 - name : Build Android apk
2020 uses : ./.github/actions/build_android
21+ env :
22+ UPLOAD_KEYSTORE_BASE64 : ${{ secrets.UPLOAD_KEYSTORE_BASE64 }}
23+ PLAY_STORE_CREDENTIALS_BASE64 : ${{ secrets.PLAY_STORE_CREDENTIALS_BASE64 }}
Original file line number Diff line number Diff line change 11{
22 "project_info" : {
3- "project_number" : " 788164346630" ,
4- "project_id" : " make-it-native-test" ,
5- "storage_bucket" : " make-it-native-test.appspot.com"
3+ "project_number" : " 542084943474" ,
4+ "firebase_url" : " https://mendix-developerapp.firebaseio.com" ,
5+ "project_id" : " mendix-developerapp" ,
6+ "storage_bucket" : " mendix-developerapp.appspot.com"
67 },
78 "client" : [
89 {
910 "client_info" : {
10- "mobilesdk_app_id" : " 1:788164346630 :android:8abda4292fe590982d1487 " ,
11+ "mobilesdk_app_id" : " 1:542084943474 :android:2ca19794e96659b1da7ceb " ,
1112 "android_client_info" : {
1213 "package_name" : " com.mendix.developerapp.mx10"
1314 }
1415 },
15- "oauth_client" : [],
16+ "oauth_client" : [
17+ {
18+ "client_id" : " 542084943474-kuqtb0msdmjroc74mf9t9oui5if4046i.apps.googleusercontent.com" ,
19+ "client_type" : 3
20+ }
21+ ],
1622 "api_key" : [
1723 {
18- "current_key" : " AIzaSyD3pLyuEY38P44jR1hHYr00qKwOL_kJm_k "
24+ "current_key" : " {{firebase-api-key}} "
1925 }
2026 ],
2127 "services" : {
2228 "appinvite_service" : {
23- "other_platform_oauth_client" : []
29+ "other_platform_oauth_client" : [
30+ {
31+ "client_id" : " 542084943474-kuqtb0msdmjroc74mf9t9oui5if4046i.apps.googleusercontent.com" ,
32+ "client_type" : 3
33+ },
34+ {
35+ "client_id" : " 542084943474-03rk9m3agr20fs8fnjg4if2kosog0iil.apps.googleusercontent.com" ,
36+ "client_type" : 2 ,
37+ "ios_info" : {
38+ "bundle_id" : " com.mendix.developerapp.native.mx10"
39+ }
40+ }
41+ ]
2442 }
2543 }
2644 }
2745 ],
2846 "configuration_version" : " 1"
29- }
47+ }
Original file line number Diff line number Diff line change 66
77default_platform ( :android )
88
9- ENV [ "GRADLE_BINTRAY_REPO" ] = ENV [ "NEXUS_BINTRAY_PROXY_URL" ]
10- ENV [ "GRADLE_JITPACK_REPO" ] = ENV [ "NEXUS_JITPACK_PROXY_URL" ]
11-
129GOOGLE_PLAY_VERSION = sh ( "node -p -e \" require('../../package.json')['store-versions']['google-play']\" " ) . chomp
1310BUILD_NUMBER = ENV [ "BUILD_NUMBER" ]
11+ TEST = ENV [ "TEST" ]
1412ORIGINAL_CHANGELOG_PATH = "../../CHANGELOG.android.txt"
1513FASTLANE_CHANGELOG_PATH = "./metadata/android/en-US/changelogs/default.txt"
1614versionCodeOffset = 304
1715
1816platform :android do
1917 before_all do
2018 Dir . chdir ( "../.." ) do
21- sh ( "npm" , "ci" , "--legacy-peer-deps" )
19+ sh ( "npm" , "ci" )
2220 # Special hack to work-around alpine linux problem - File.getCanonicalPath is failing without a reason:
2321 sh ( "find node_modules -name '*.gradle' -type f -exec sed -i.bak '/canonicalPath/d' {} +" )
2422 end
@@ -74,10 +72,8 @@ platform :android do
7472
7573 UI . message "Replacing Firebase API keys from environment variables"
7674 Dir . chdir ( "../app" ) do
77- firebaseApiKey1 = ENV [ "FIREBASE_API_KEY_1" ] || "FIREBASE_API_KEY_1"
78- sh ( "sed -i 's/{{firebase-api-key-1}}/#{ firebaseApiKey1 } /g' google-services.json" )
79- firebaseApiKey2 = ENV [ "FIREBASE_API_KEY_2" ] || "FIREBASE_API_KEY_2"
80- sh ( "sed -i 's/{{firebase-api-key-2}}/#{ firebaseApiKey2 } /g' google-services.json" )
75+ firebaseApiKey = ENV [ "FIREBASE_API_KEY" ] || "FIREBASE_API_KEY"
76+ sh ( "sed -i 's/{{firebase-api-key}}/#{ firebaseApiKey } /g' google-services.json" )
8177 end
8278
8379 if options [ :submit ] == true
You can’t perform that action at this time.
0 commit comments