Skip to content

Commit

Permalink
Use GitHub Actions to automate the compatibility check with the lates…
Browse files Browse the repository at this point in the history
…t canary of studio
  • Loading branch information
pbreault committed Nov 28, 2024
1 parent 5bf8e17 commit ff86cf1
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/check-studio-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check compatibility with latest Android Studio Canary
on:
schedule:
- cron: '25 21 * * *'
jobs:
fetch-studio-version:
runs-on: ubuntu-latest
steps:
- name: Fetch latest studio version
id: fetch-studio-version
run: |
# Fetch the latest Canary version of Android Studio
curl -sL https://jb.gg/android-studio-releases-list.json > studio-releases.json
VERSION=$(cat studio-releases.json | jq -r '.content.item[] | select(.channel == "Canary") | .version' | head -n 1)
echo "Testing with Android Studio Canary version **$VERSION**" >> "$GITHUB_STEP_SUMMARY"
echo "STUDIO_VERSION=$VERSION" >> "$GITHUB_OUTPUT"
# Print JSON content to the job summary
echo '```json' >> "$GITHUB_STEP_SUMMARY"
cat studio-releases.json | jq '.content.item | map(select(.channel == "Canary")) | .[0] | del(.download)' >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
- name: Checkout Sources
uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with latest canary version
env:
STUDIO_VERSION: ${{ steps.fetch-studio-version.outputs.STUDIO_VERSION }}
run: |
echo "Building with Android Studio Canary version: $STUDIO_VERSION"
./gradlew build -PideVersion=$STUDIO_VERSION

0 comments on commit ff86cf1

Please sign in to comment.