fix(ci): manually cache Android SDK build-tools

This is necessary to avoid the extremely slow re-download on each run
This commit is contained in:
Harsh Shandilya 2023-05-28 02:59:44 +05:30
parent c91a34aae5
commit 4764698583
No known key found for this signature in database
4 changed files with 76 additions and 21 deletions

View file

@ -20,16 +20,27 @@ jobs:
token: ${{ secrets.POST_RELEASE_GH_TOKEN }}
fetch-depth: 0
- name: Accept all SDK licenses
shell: bash
run: printf 'y\ny\ny\ny\ny\ny\n' | $ANDROID_HOME/tools/bin/sdkmanager --licenses
- name: Get build-tools directory
id: build-tools-path
shell: bash
run: echo "dir=${ANDROID_HOME}/build-tools/34.0.0-rc3" >> "${GITHUB_OUTPUT}"
- name: Cache build-tools
uses: actions/cache@v3
with:
path: ${{ steps.build-tools-path.outputs.dir }}
key: ${{ runner.os }}-34.0.0-rc3
- name: Set up JDK
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with:
distribution: temurin
java-version: 18
- name: Accept all SDK licenses
shell: bash
run: printf 'y\ny\ny\ny\ny\n' | $ANDROID_HOME/tools/bin/sdkmanager --licenses
- name: Set up Git author
shell: bash
run: |