File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,27 +37,16 @@ jobs:
3737 ANDROID_KEYSTORE_PASSWORD : ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
3838 ANDROID_KEY_ALIAS : ${{ secrets.ANDROID_KEY_ALIAS }}
3939 ANDROID_KEY_PASSWORD : ${{ secrets.ANDROID_KEY_PASSWORD }}
40-
41- - name : Align APK with latest build-tools
40+
41+ - name : Verify APK exists
4242 run : |
43- # Find latest build-tools version
44- BUILD_TOOLS_VERSION=$(ls -1 ${ANDROID_HOME}/build-tools | sort -V | tail -n 1)
45- echo "Using build-tools version: $BUILD_TOOLS_VERSION"
46-
47- ${ANDROID_HOME}/build-tools/${BUILD_TOOLS_VERSION}/zipalign -v 4 \
48- app/build/outputs/apk/release/app-release-unsigned.apk \
49- app/build/outputs/apk/release/app-release.apk
50-
51- - name : Sign Release APK (if keystore exists)
52- id : sign_app
53- uses : ilharp/sign-android-release@v1.0.4
54- with :
55- buildToolsVersion : 35.0.0
56- releaseDir : app/build/outputs/apk/release
57- signingKey : ${{ secrets.ANDROID_KEYSTORE }}
58- keyAlias : ${{ secrets.ANDROID_KEY_ALIAS }}
59- keyStorePassword : ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
60- keyPassword : ${{ secrets.ANDROID_KEY_PASSWORD }}
43+ if [ -f app/build/outputs/apk/release/app-release.apk ]; then
44+ echo "✅ Release APK built successfully"
45+ ls -lh app/build/outputs/apk/release/app-release.apk
46+ else
47+ echo "❌ Release APK not found"
48+ exit 1
49+ fi
6150
6251 - name : Get commit info
6352 id : commit_info
Original file line number Diff line number Diff line change @@ -50,26 +50,15 @@ jobs:
5050 - name : Build Debug APK
5151 run : ./gradlew assembleDebug
5252
53- - name : Align APK with latest build-tools
53+ - name : Verify APK exists
5454 run : |
55- # Find latest build-tools version
56- BUILD_TOOLS_VERSION=$(ls -1 ${ANDROID_HOME}/build-tools | sort -V | tail -n 1)
57- echo "Using build-tools version: $BUILD_TOOLS_VERSION"
58-
59- ${ANDROID_HOME}/build-tools/${BUILD_TOOLS_VERSION}/zipalign -v 4 \
60- app/build/outputs/apk/release/app-release-unsigned.apk \
61- app/build/outputs/apk/release/app-release.apk
62-
63- - name : Sign Release APK (if keystore exists)
64- id : sign_app
65- uses : ilharp/sign-android-release@v1.0.4
66- with :
67- buildToolsVersion : 35.0.0
68- releaseDir : app/build/outputs/apk/release
69- signingKey : ${{ secrets.ANDROID_KEYSTORE }}
70- keyAlias : ${{ secrets.ANDROID_KEY_ALIAS }}
71- keyStorePassword : ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
72- keyPassword : ${{ secrets.ANDROID_KEY_PASSWORD }}
55+ if [ -f app/build/outputs/apk/release/app-release.apk ]; then
56+ echo "✅ Release APK built successfully"
57+ ls -lh app/build/outputs/apk/release/app-release.apk
58+ else
59+ echo "❌ Release APK not found"
60+ exit 1
61+ fi
7362
7463 - name : Get build info
7564 id : build_info
You can’t perform that action at this time.
0 commit comments