From dd876c766c720c2e2fcb3072c989a0424d8ee67d Mon Sep 17 00:00:00 2001 From: vocoder712 <100213316+vocoder712@users.noreply.github.com> Date: Fri, 24 Jul 2026 19:04:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E4=B8=8A=E4=BC=A0=E5=B7=B2=E7=AD=BE?= =?UTF-8?q?=E5=90=8D=E7=9A=84=E5=AE=89=E8=A3=85=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-android-dev.yml | 36 ++++++++++++++++++++----- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-android-dev.yml b/.github/workflows/build-android-dev.yml index 38a3219..8a95044 100644 --- a/.github/workflows/build-android-dev.yml +++ b/.github/workflows/build-android-dev.yml @@ -76,10 +76,32 @@ jobs: -p:AndroidSigningKeyAlias=${{ secrets.ANDROID_KEY_ALIAS }} \ -p:AndroidSigningKeyPass=${{ secrets.ANDROID_KEY_PASSWORD }} \ -p:RuntimeIdentifier=android-arm64 - # 上传 apk - - name: Upload APK - uses: actions/upload-artifact@v4 - with: - name: OpenUtauMobile-android-arm64 - path: | - OpenUtauMobile.Android/bin/Release/net10.0-android36.0/android-arm64/publish/*.apk + - name: Prepare APK Artifact + shell: bash + run: | + PUBLISH_DIR="OpenUtauMobile.Android/bin/Release/net10.0-android36.0/android-arm64/publish" + ARTIFACT_DIR="artifacts/android-arm64" + + echo "===== 准备上传 =====" + find "$PUBLISH_DIR" -maxdepth 1 -type f -printf '%f\n' + + mkdir -p "$ARTIFACT_DIR" + + SIGNED_APK="$(find "$PUBLISH_DIR" -maxdepth 1 -type f \ + \( -iname '*-signed.apk' \) \ + | head -n 1)" + + if [ -z "$SIGNED_APK" ]; then + echo "::error::找不到已签名的 APK 文件" + exit 1 + fi + + cp "$SIGNED_APK" \ + "$ARTIFACT_DIR/OpenUtauMobile-预览版-${{ github.run_number }}-arm64.apk" + + - name: Upload APK + uses: actions/upload-artifact@v4 + with: + name: OpenUtauMobile-预览版-android-arm64-${{ github.run_number }} + path: artifacts/android-arm64/OpenUtauMobile-预览版-${{ github.run_number }}-arm64.apk + if-no-files-found: error \ No newline at end of file