From 034af21b11d7ba8ae1f9d8be36ba1f9b3e976e89 Mon Sep 17 00:00:00 2001 From: Oleksandr Volovyk <70570597+oleksandrvolovyk@users.noreply.github.com> Date: Sat, 3 Feb 2024 20:32:49 +0200 Subject: [PATCH] ci: Always use the latest Android build tools Taken from r0adkll/sign-android-release#84 --- .github/workflows/android.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 025652e..6120c4f 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -67,6 +67,13 @@ jobs: if: success() run: ./gradlew :app:assembleRelease + - name: Setup build tool version variable + shell: bash + run: | + BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1) + echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV + echo Last build tool version is: $BUILD_TOOL_VERSION + - name: Sign release APK if: success() uses: r0adkll/sign-android-release@v1 @@ -77,6 +84,8 @@ jobs: alias: ${{ secrets.KEY_ALIAS }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} + env: + BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }} - name: Build release AAB if: success() @@ -92,6 +101,8 @@ jobs: alias: ${{ secrets.KEY_ALIAS }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} + env: + BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }} - name: Create CHANGELOG id: changelog