From 71abf6435f07a82634a1e271ae986f1463f19114 Mon Sep 17 00:00:00 2001 From: Super12138 <70494801+Super12138@users.noreply.github.com> Date: Sat, 14 Feb 2026 23:27:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D=20N?= =?UTF-8?q?DK=20=E7=BC=93=E5=AD=98=E5=8A=9F=E8=83=BD=EF=BC=88AI=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/android_ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/android_ci.yml b/.github/workflows/android_ci.yml index 7d19ac4..7ee3b9e 100644 --- a/.github/workflows/android_ci.yml +++ b/.github/workflows/android_ci.yml @@ -1,4 +1,8 @@ name: Android CI + +env: + NDK_VERSION: "28.2.13676358" + on: push: branches: [ "main" ] @@ -24,20 +28,16 @@ jobs: distribution: 'temurin' cache: gradle - # 缓存NDK - name: Cache NDK + id: cache-ndk uses: actions/cache@v5.0.3 with: - path: | - ${{ env.ANDROID_HOME }}/ndk - key: ndk-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ndk-${{ runner.os }}- + path: ${{ env.ANDROID_HOME }}/ndk/${{ env.NDK_VERSION }} + key: ${{ runner.os }}-ndk-${{ env.NDK_VERSION }} - # 仅当NDK缓存未命中时才安装NDK - - name: Install NDK 28.2.13676358 + - name: Install NDK if: steps.cache-ndk.outputs.cache-hit != 'true' - run: echo "y" | sudo ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install 'ndk;28.2.13676358' + run: echo "y" | sudo ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;${{ env.NDK_VERSION }}" - name: Grant execute permission for gradlew run: chmod +x gradlew @@ -56,7 +56,7 @@ jobs: - name: Fix Permissions for Debug Keystore Path if: github.ref != 'refs/heads/main' run: sudo chmod -R 777 /home/runner/.config/.android - + - name: Build with Gradle run: ./gradlew assembleRelease