Skip to content

Commit d2ac74d

Browse files
Copilotwysaid
andcommitted
Improve APK detection and fix AAR packaging loop for robustness
Co-authored-by: wysaid <[email protected]>
1 parent 9a83ea5 commit d2ac74d

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,16 @@ jobs:
102102
echo "🔨 Building demo APK with video module (default configuration)..."
103103
./tasks.sh --enable-cmake --release --enable-video-module --build
104104
105-
# Find and copy the APK
106-
APK_PATH=$(find "cgeDemo/build" -name "*.apk" | grep -i release | head -1)
105+
# Find and copy the APK (look specifically for release build output)
106+
APK_PATH=$(find "cgeDemo/build/outputs/apk/release" -name "*-release.apk" -o -name "*-release-unsigned.apk" | head -1)
107+
if [ -z "$APK_PATH" ]; then
108+
# Fallback: search in build directory
109+
APK_PATH=$(find "cgeDemo/build" -path "*/release/*" -name "*.apk" | head -1)
110+
fi
107111
if [ -z "$APK_PATH" ]; then
108112
echo "❌ APK not found!"
113+
echo "Searched locations:"
114+
find "cgeDemo/build" -name "*.apk" || echo "No APK files found"
109115
exit 1
110116
fi
111117
@@ -125,11 +131,13 @@ jobs:
125131
126132
# Find and copy all AAR files from the maven repository
127133
# Expected structure: /tmp/maven-repo/org/wysaid/gpuimage-plus/{version}/gpuimage-plus-{version}.aar
128-
find "$MAVEN_REPO/org/wysaid/gpuimage-plus" -name "*.aar" | while read aar_file; do
129-
filename=$(basename "$aar_file")
130-
cp "$aar_file" "$ARTIFACTS_DIR/$filename"
131-
echo " ✓ Packaged: $filename"
132-
done
134+
while IFS= read -r aar_file; do
135+
if [ -n "$aar_file" ]; then
136+
filename=$(basename "$aar_file")
137+
cp "$aar_file" "$ARTIFACTS_DIR/$filename"
138+
echo " ✓ Packaged: $filename"
139+
fi
140+
done < <(find "$MAVEN_REPO/org/wysaid/gpuimage-plus" -name "*.aar")
133141
134142
echo "✅ All AAR artifacts packaged"
135143
echo "📦 Final artifacts:"

0 commit comments

Comments
 (0)