Skip to content

Commit 90042a5

Browse files
committed
Fix build workflow APK path discovery
- Use find to locate APK in build outputs - Handle any APK location structure Gradle produces - Add error handling if APK not found
1 parent 5ac9f44 commit 90042a5

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,19 @@ jobs:
3939
- name: Build release APK
4040
run: gradle assembleRelease
4141

42-
- name: Rename APK
42+
- name: Find and rename APK
4343
run: |
44-
cp app/build/outputs/apk/release/app-release.apk \
45-
app/build/outputs/apk/release/OpenTasker-v${{ inputs.version }}-release.apk
44+
# Find the built APK
45+
APK_PATH=$(find app/build/outputs/apk -name "*.apk" -type f | head -1)
46+
if [ -z "$APK_PATH" ]; then
47+
echo "ERROR: No APK found in app/build/outputs/apk"
48+
exit 1
49+
fi
50+
echo "Found APK at: $APK_PATH"
51+
52+
# Rename and move to release directory
53+
mkdir -p app/build/outputs/apk/release
54+
cp "$APK_PATH" app/build/outputs/apk/release/OpenTasker-v${{ inputs.version }}-release.apk
4655
4756
- name: Create Release
4857
uses: softprops/action-gh-release@v1

0 commit comments

Comments
 (0)