Skip to content

The only downloader you need. 下载器的集大成者。

fix(ci): APK 路径按 variant 定位

XiaoYouChRce7e6756ab56
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index efd8f42d..ec3e0dd5 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -823,17 +823,17 @@ jobs:
- name: Build APK
working-directory: compose
run: |
- if [ -f keystore.properties ]; then
- echo "[ci] keystore ready, signing as release"
+ if [ "$HAS_KEYSTORE" = 'true' ]; then
+ echo "APK_VARIANT=release" >> "$GITHUB_ENV"
./gradlew :app:assembleRelease
else
- echo "[ci] no keystore secret, building debug APK"
+ echo "APK_VARIANT=debug" >> "$GITHUB_ENV"
./gradlew :app:assembleDebug
fi
- name: Rename APK
run: |
- APK=$(find compose/app/build/outputs/apk -name '*.apk' | head -1)
+ APK=$(ls compose/app/build/outputs/apk/"$APK_VARIANT"/*.apk)
DEST="Ghost-Downloader-v${{ needs.prepare.outputs.version }}-Android-arm64-v8a.apk"
mv "$APK" "$DEST"
echo "APK_FILE=$DEST" >> "$GITHUB_ENV"