Skip to content

Commit 390a87e

Browse files
committed
fix: Remove redundant signing steps from workflows
- Gradle now handles signing via build.gradle.kts with environment variables - Removed ilharp/sign-android-release action (no longer needed) - Removed manual zipalign step (Gradle does this automatically) - Added verification step to ensure APK exists after build - Fixes 'Output file exists' error in GitHub Actions
1 parent 5318562 commit 390a87e

2 files changed

Lines changed: 17 additions & 39 deletions

File tree

.github/workflows/android-build.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff 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

.github/workflows/release.yml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)