Cooking the next 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: Build and Github Release | |
run-name: Cooking the next version | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
name: Build APK | |
runs-on: ubuntu-latest | |
steps: | |
- name: Enable KVM group perms | |
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: Checkout repository | |
uses: actions/checkout@v4.1.4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4.2.1 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3.2.1 | |
- name: Write Sentry config file | |
run: echo "${{ secrets.SENTRY_CONFIG }}" > "sentry.properties" | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Assemble release variant including baseline profile generation | |
run: ./gradlew :app:assembleRelease | |
-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: Upload APK | |
uses: actions/upload-artifact@v4.3.3 | |
with: | |
name: app-release | |
path: app/build/outputs/apk/release/app-release.apk | |
release: | |
name: Release | |
needs: build | |
permissions: | |
contents: write | |
runs-on: macos-latest | |
steps: | |
- name: Download APK from build | |
uses: actions/download-artifact@v4.1.7 | |
with: | |
name: app-release | |
- name: Create release | |
uses: softprops/action-gh-release@v2.0.4 | |
with: | |
files: app-release.apk |