Adaptive score screen #16
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 | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 120 | |
permissions: | |
contents: write | |
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 | |
uses: actions/checkout@v4 | |
- name: Grant execute permission to Gradle wrapper | |
run: chmod +x ./gradlew | |
- name: Validate Gradle Wrapper | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Install GMD image for baseline profile generation | |
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;aosp_atd;x86_64" | |
- name: Accept Android licenses | |
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true | |
- name: Google Services JSON file | |
env: | |
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
run: | | |
cat /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json | base64 | |
echo $DATA > /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json | |
- name: Build release variant including baseline profile generation | |
run: ./gradlew :app:assembleRelease :app:bundleRelease | |
-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: Sign release APK | |
uses: r0adkll/sign-android-release@v1 | |
id: sign_release_apk | |
with: | |
releaseDirectory: app/build/outputs/apk/release | |
signingKeyBase64: ${{ secrets.SIGNING_KEY_BASE64 }} | |
alias: ${{ secrets.SIGNING_KEY_ALIAS }} | |
keyStorePassword: ${{ secrets.SIGNING_KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
env: | |
BUILD_TOOLS_VERSION: "34.0.0" | |
- name: Sign release AAB | |
uses: r0adkll/sign-android-release@v1 | |
id: sign_release_aab | |
with: | |
releaseDirectory: app/build/outputs/bundle/release | |
signingKeyBase64: ${{ secrets.SIGNING_KEY_BASE64 }} | |
alias: ${{ secrets.SIGNING_KEY_ALIAS }} | |
keyStorePassword: ${{ secrets.SIGNING_KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
env: | |
BUILD_TOOLS_VERSION: "34.0.0" | |
- name: Rename signed Files | |
run: | | |
mv ${{steps.sign_release_apk.outputs.signedReleaseFile}} app/build/outputs/apk/release/swr-${{ github.ref_name }}.apk | |
mv ${{steps.sign_release_aab.outputs.signedReleaseFile}} app/build/outputs/bundle/release/swr-${{ github.ref_name }}.aab | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
app/build/outputs/apk/release/swr-${{ github.ref_name }}.apk | |
app/build/outputs/bundle/release/swr-${{ github.ref_name }}.aab |