mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 13:48:30 +09:00
[Fix] (CI): scan rather than hardcode apk file name
This commit is contained in:
@@ -56,10 +56,25 @@ jobs:
|
|||||||
- name: Verify signed APK
|
- name: Verify signed APK
|
||||||
run: |
|
run: |
|
||||||
APKSIGNER="$(find "$ANDROID_HOME/build-tools" -name apksigner -type f | sort -V | tail -n 1)"
|
APKSIGNER="$(find "$ANDROID_HOME/build-tools" -name apksigner -type f | sort -V | tail -n 1)"
|
||||||
"$APKSIGNER" verify --verbose android-plugin/app/build/outputs/apk/release/app-release.apk
|
mapfile -t APKS < <(find android-plugin/app/build/outputs/apk -type f -path '*/release/*.apk' | sort)
|
||||||
|
if [ "${#APKS[@]}" -eq 0 ]; then
|
||||||
|
echo "::error::No release APKs found under android-plugin/app/build/outputs/apk"
|
||||||
|
find android-plugin/app/build/outputs/apk -type f -print || true
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
for APK in "${APKS[@]}"; do
|
||||||
|
if [[ "$APK" == *-unsigned.apk ]]; then
|
||||||
|
echo "::error::Unsigned release APK produced: $APK"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
"$APKSIGNER" verify --verbose "$APK"
|
||||||
|
done
|
||||||
|
|
||||||
- name: Upload plugin APK
|
- name: Upload plugin APK
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: MobileGL-plugin-${{ env.date_today }}-${{ env.short_sha }}
|
name: MobileGL-plugin-${{ env.date_today }}-${{ env.short_sha }}
|
||||||
path: android-plugin/app/build/outputs/apk/release/app-release.apk
|
path: |
|
||||||
|
android-plugin/app/build/outputs/apk/release/*.apk
|
||||||
|
android-plugin/app/build/outputs/apk/**/release/*.apk
|
||||||
|
|||||||
Reference in New Issue
Block a user