Commit 2790ae4 1 parent 30c4150 commit 2790ae4 Copy full SHA for 2790ae4
File tree 5 files changed +88
-18
lines changed
5 files changed +88
-18
lines changed Original file line number Diff line number Diff line change 1
1
name : ' Build Android App'
2
2
description : ' 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
3
14
4
15
runs :
5
16
using : ' composite'
@@ -26,11 +37,21 @@ runs:
26
37
node-version-file : .nvmrc
27
38
28
39
- name : Build Android Library with Fastlane
29
- run : cd android && fastlane android local
40
+ run : |
41
+ cd android
42
+ fastlane android local
30
43
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 }}
31
50
32
51
- 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
34
55
shell : bash
35
56
36
57
- 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
+ FIREBASE_API_KEY : ${{ secrets.FIREBASE_API_KEY }}
29
+ ANDROID_KEYSTORE_PATH : ${{ env.ANDROID_KEYSTORE_PATH }}
30
+ ANDROID_KEYSTORE_PASSWORD : ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
31
+ ANDROID_KEYSTORE_ALIAS : ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
32
+ ANDROID_KEYSTORE_KEY_PASSWORD : ${{ secrets.ANDROID_KEYSTORE_KEY_PASSWORD }}
Original file line number Diff line number Diff line change 18
18
19
19
- name : Build Android apk
20
20
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 1
1
{
2
2
"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"
6
7
},
7
8
"client" : [
8
9
{
9
10
"client_info" : {
10
- "mobilesdk_app_id" : " 1:788164346630 :android:8abda4292fe590982d1487 " ,
11
+ "mobilesdk_app_id" : " 1:542084943474 :android:2ca19794e96659b1da7ceb " ,
11
12
"android_client_info" : {
12
13
"package_name" : " com.mendix.developerapp.mx10"
13
14
}
14
15
},
15
- "oauth_client" : [],
16
+ "oauth_client" : [
17
+ {
18
+ "client_id" : " 542084943474-kuqtb0msdmjroc74mf9t9oui5if4046i.apps.googleusercontent.com" ,
19
+ "client_type" : 3
20
+ }
21
+ ],
16
22
"api_key" : [
17
23
{
18
- "current_key" : " AIzaSyD3pLyuEY38P44jR1hHYr00qKwOL_kJm_k "
24
+ "current_key" : " {{firebase-api-key}} "
19
25
}
20
26
],
21
27
"services" : {
22
28
"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
+ ]
24
42
}
25
43
}
26
44
}
27
45
],
28
46
"configuration_version" : " 1"
29
- }
47
+ }
Original file line number Diff line number Diff line change 6
6
7
7
default_platform ( :android )
8
8
9
- ENV [ "GRADLE_BINTRAY_REPO" ] = ENV [ "NEXUS_BINTRAY_PROXY_URL" ]
10
- ENV [ "GRADLE_JITPACK_REPO" ] = ENV [ "NEXUS_JITPACK_PROXY_URL" ]
11
-
12
9
GOOGLE_PLAY_VERSION = sh ( "node -p -e \" require('../../package.json')['store-versions']['google-play']\" " ) . chomp
13
10
BUILD_NUMBER = ENV [ "BUILD_NUMBER" ]
11
+ TEST = ENV [ "TEST" ]
14
12
ORIGINAL_CHANGELOG_PATH = "../../CHANGELOG.android.txt"
15
13
FASTLANE_CHANGELOG_PATH = "./metadata/android/en-US/changelogs/default.txt"
16
14
versionCodeOffset = 304
17
15
18
16
platform :android do
19
17
before_all do
20
18
Dir . chdir ( "../.." ) do
21
- sh ( "npm" , "ci" , "--legacy-peer-deps" )
19
+ sh ( "npm" , "ci" )
22
20
# Special hack to work-around alpine linux problem - File.getCanonicalPath is failing without a reason:
23
21
sh ( "find node_modules -name '*.gradle' -type f -exec sed -i.bak '/canonicalPath/d' {} +" )
24
22
end
@@ -74,10 +72,8 @@ platform :android do
74
72
75
73
UI . message "Replacing Firebase API keys from environment variables"
76
74
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" )
81
77
end
82
78
83
79
if options [ :submit ] == true
You can’t perform that action at this time.
0 commit comments