Add automation to build with the latest canary version #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fetch latest studio version | |
on: [push] | |
jobs: | |
fetch-studio-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- 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: 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 | |