File tree Expand file tree Collapse file tree 3 files changed +41
-3
lines changed
Expand file tree Collapse file tree 3 files changed +41
-3
lines changed Original file line number Diff line number Diff line change 11name : ' Build Android App'
22description : ' Builds the Android app using Fastlane'
33
4+ inputs :
5+ google_services_json :
6+ description : ' Base64-encoded google-services.json file'
7+ required : true
8+
49runs :
510 using : composite
611
@@ -26,10 +31,23 @@ runs:
2631 with :
2732 node-version-file : .nvmrc
2833
34+ - name : Decode google-services.json
35+ env :
36+ GOOGLE_SERVICES_JSON : ${{ inputs.google_services_json }}
37+ run : |
38+ echo $GOOGLE_SERVICES_JSON | base64 --decode > android/app/google-services.json
39+ shell : bash
40+
2941 - name : Build Android APK with Fastlane
3042 run : npm run android:debug
3143 shell : bash
3244
45+ - name : Debug APK Output Directory
46+ run : |
47+ echo "Listing APK output directory:"
48+ ls -R ./android/app/build/outputs/apk/ || echo "Directory does not exist"
49+ shell : bash
50+
3351 - name : Copy Android APK to Shared Directory
3452 run : |
3553 mkdir -p ${{ github.workspace }}/artifacts/android-app
4563 uses : actions/upload-artifact@v4
4664 with :
4765 name : android-app
48- path : ${{ github.workspace }}/artifacts/android/
66+ path : ${{ github.workspace }}/artifacts/android-app /
Original file line number Diff line number Diff line change @@ -100,9 +100,11 @@ jobs:
100100 runs-on : ubuntu-22.04
101101 steps :
102102 - name : " Check out code"
103- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
103+ uses : actions/checkout@v4
104104 - name : Build android apk
105105 uses : ./.github/actions/build-android
106+ with :
107+ google_services_json : ${{ secrets.GOOGLE_SERVICES_JSON }}
106108
107109 android-test :
108110 needs : [mendix-version, project, android-app]
@@ -119,6 +121,24 @@ jobs:
119121 with :
120122 name : android-app
121123 path : android-app
124+
125+ - name : " Debug Android app directory"
126+ run : |
127+ echo "Listing contents of android-app directory:"
128+ ls -R android-app/
129+ shell : bash
130+
131+ - name : " Check for APK file"
132+ run : |
133+ echo "Checking for APK file..."
134+ if [ -f android-app/app-production-debug.apk ]; then
135+ echo "APK file found: android-app/app-production-debug.apk"
136+ else
137+ echo "APK file not found!"
138+ exit 1
139+ fi
140+ shell : bash
141+
122142 - name : " Start runtime"
123143 uses : ./.github/actions/start-runtime
124144 with :
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ install_android_app() {
1313 while [ " $RETRIES " -lt " $MAX_RETRIES " ]; do
1414 echo " Attempt $(( $RETRIES + 1 )) of $MAX_RETRIES : Installing APK..."
1515
16- adb install /home/runner/work/make-it-native/make-it-native/artifacts/ android/app-production-debug.apk
16+ adb install /home/runner/work/make-it-native/make-it-native/android-app /app-production-debug.apk
1717
1818 if adb shell pm list packages | grep -q " com.mendix.developerapp.mx10" ; then
1919 echo " App installed successfully!"
You can’t perform that action at this time.
0 commit comments