From 87d30b7a0bb8a76c4bc371de79a254dc26509812 Mon Sep 17 00:00:00 2001 From: geokrety-bot Date: Sun, 29 Dec 2024 16:34:18 +0100 Subject: [PATCH] ci: Dynamically set build tools version Relates r0adkll/sign-android-release#84 --- .github/workflows/android.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 6141910..3612600 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -60,6 +60,13 @@ jobs: ref: ${{ inputs.ref || github.ref }} fetch-depth: 0 + - 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: Download APK from build uses: actions/download-artifact@v3 with: @@ -81,7 +88,7 @@ jobs: keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} env: - BUILD_TOOLS_VERSION: "32.0.0" + BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }} - name: 'Get Previous tag' id: previoustag