From f5dd5f3826cc8b4f9b88359ffbb4770b88c52b40 Mon Sep 17 00:00:00 2001 From: Natsu Date: Sat, 6 Jul 2024 11:50:23 +0700 Subject: [PATCH] chore(build.yml): update sign-android-release action to use r0adkll/sign-android-release@v1 feat(build.yml): add environment variable for RUNNER_TOOL_CACHE fix(build.yml): update release directory and signing key variables in sign_app step fix(build.yml): update buildToolsVersion variable in sign_app step fix(build.yml): update signedFile variable to signedReleaseFile in Rename Signed APK step --- .github/workflows/build.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d057e9..1a0ecd0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,9 @@ jobs: runs-on: ubuntu-latest + env: + RUNNER_TOOL_CACHE: /toolcache + steps: - name: Checkout uses: actions/checkout@v4 @@ -52,22 +55,23 @@ jobs: run: ./gradlew build - name: Sign APK - uses: ilharp/sign-android-release@v1 + uses: r0adkll/sign-android-release@v1 id: sign_app with: - releaseDir: app/build/outputs/apk/debug - signingKey: ${{ secrets.KEYSTOREB64 }} - keyAlias: ${{ secrets.ANDROID_KEY_ALIAS }} + releaseDirectory: app/build/outputs/apk/release + signingKeyBase64: ${{ secrets.KEYSTOREB64 }} + alias: ${{ secrets.ANDROID_KEY_ALIAS }} keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} - buildToolsVersion: 35.0.0 + env: + BUILD_TOOLS_VERSION: "35.0.0" continue-on-error: true - name: Rename Signed APK run: | branch=$(git rev-parse --abbrev-ref HEAD) hash=$(git rev-parse --short=7 HEAD) - mv ${{steps.sign_app.outputs.signedFile}} app/build/outputs/apk/debug/Gakumas-Localify-EN_$branch.$hash.apk + mv ${{steps.sign_app.outputs.signedReleaseFile}} app/build/outputs/apk/debug/Gakumas-Localify-EN_$branch.$hash.apk echo "SIGNED_APK=app/build/outputs/apk/debug/Gakumas-Localify-EN_$branch.$hash.apk" >> $GITHUB_ENV - name: Upload Artifact