Install default GMD image instead of aosp one #18
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: Release a new version | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
API_SECRET: ${{ secrets.API_SECRET }} | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
timeout-minutes: 120 | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v3 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v3 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build changelog | |
id: build_changelog | |
uses: mikepenz/release-changelog-builder-action@v5 | |
with: | |
configuration: "changelog_config.json" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Configure Keystore | |
shell: bash | |
run: | | |
echo '${{ secrets.KEYSTORE_FILE }}' | base64 -d > ./app/podcaster_keystore.jks | |
echo "storeFile=./podcaster_keystore.jks" >> keystore.properties | |
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> keystore.properties | |
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> keystore.properties | |
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> keystore.properties | |
env: | |
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
KEYSTORE_KEY_PASSWORD: ${{ secrets.STORE_KEY_PASSWORD }} | |
KEYSTORE_STORE_PASSWORD: ${{ secrets.STORE_KEY_PASSWORD }} | |
- name: Enable KVM group perms (for baseline profiles generation) | |
run: | | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
sudo udevadm control --reload-rules | |
sudo udevadm trigger --name-match=kvm | |
ls /dev/kvm | |
- name: Install GMD image for baseline profile generation | |
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;default;x86_64" # not all combinations of system images are available in all API level | |
- name: Accept Android licenses | |
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true | |
- name: Generate Updated baseline profiles | |
run: ./gradlew :app:generateReleaseBaselineProfile | |
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile | |
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" | |
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true | |
-Pandroid.experimental.androidTest.numManagedDeviceShards=1 | |
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1 | |
- name: Commit and push baseline profiles changes (if any). | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: EndBug/add-and-commit@v9 | |
with: | |
author_name: GitHub Actions | |
author_email: [email protected] | |
message: Update baseline profiles | |
push: true | |
- name: Build & Publish Release (.aab) bundle to Play console | |
run: ./gradlew bundleRelease publishReleaseBundle | |
env: | |
ANDROID_PUBLISHER_CREDENTIALS: ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }} | |
- name: Build release APK | |
run: ./gradlew assembleRelease --stacktrace | |
- name: Upload release APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-release | |
path: ./app/build/outputs/apk/release/app-release.apk | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "./app/build/outputs/apk/release/app-release.apk" | |
body: ${{ steps.build_changelog.outputs.changelog }} |