@@ -14,58 +14,51 @@ jobs:
1414 steps :
1515 - name : Checkout repository
1616 uses : actions/checkout@v3
17- run : echo "Repository checked out."
1817
1918 - name : Set up JDK 17
2019 uses : actions/setup-java@v3
2120 with :
2221 distribution : ' temurin'
2322 java-version : 17
24- run : echo "JDK 17 setup complete."
2523
2624 - name : Decode keystore
2725 run : |
2826 echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > policies_comores.jks
29- echo "Keystore decoded."
3027
3128 - name : Set up Gradle
3229 uses : gradle/gradle-build-action@v2
3330 with :
3431 cache-disabled : true
35- run : echo "Gradle setup complete."
3632
3733 - name : Verify Gradle Tasks
38- run : |
39- ./gradlew tasks
40- echo "Gradle tasks verified."
34+ run : ./gradlew tasks
4135
4236 - name : Build release APK
4337 run : ./gradlew assemblecomoresDevDebug --stacktrace
4438 env :
4539 KEYSTORE_PASSWORD : ${{ secrets.KEYSTORE_PASSWORD }}
4640 KEY_ALIAS : ${{ secrets.KEY_ALIAS }}
4741 KEY_PASSWORD : ${{ secrets.KEY_PASSWORD }}
48- run : echo "Release APK built."
4942
5043 - name : Explore build directory
51- run : |
52- ls -R .
53- echo "Build directory explored."
44+ run : ls -R .
5445
5546 - name : Rename APK
47+ id : rename_apk
5648 run : |
57- mv claimManagement/build/outputs/apk/bephaDev/debug/*.apk claims-comores-test.apk || echo "APK not found"
58- echo "APK renamed."
59-
60- - name : List APK files
61- run : |
62- ls -l claims-comores-test.apk || echo "APK not found"
63- echo "APK files listed."
49+ if [ -f claimManagement/build/outputs/apk/bephaDev/debug/*.apk ]; then
50+ mv claimManagement/build/outputs/apk/bephaDev/debug/*.apk claims-comores-test.apk
51+ echo "renamed=true" >> $GITHUB_OUTPUT
52+ else
53+ echo "APK not found in expected location"
54+ echo "renamed=false" >> $GITHUB_OUTPUT
55+ # Try to find the APK elsewhere
56+ find . -name "*.apk" -type f
57+ fi
6458
6559 - name : Upload APK
66- if : success() && steps.rename_apk.outcome == 'success '
60+ if : steps.rename_apk.outputs.renamed == 'true '
6761 uses : actions/upload-artifact@v4
6862 with :
69- name : claims-comores-test.apk
70- path : claims-comores-test.apk
71- run : echo "APK uploaded."
63+ name : claims-comores-test
64+ path : claims-comores-test.apk
0 commit comments