make AlwaysAllowChargingSounds respect the user settings #21
Workflow file for this run
This file contains hidden or 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 & Upload APKs | |
on: | |
push: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cache Gradle | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: gradle-cache-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'gradle/libs.versions.toml') }} | |
restore-keys: gradle-cache- | |
- name: Prepare files | |
run: | | |
chmod +x gradlew | |
- name: Compile | |
run: ./gradlew assembleDebug | |
- name: Upload Result (all APKs) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: all-apks.zip | |
path: '*/build/outputs/apk/debug/*-debug.apk' | |
if-no-files-found: error | |
- name: Find APKs and set matrix | |
id: find_apks | |
run: | | |
set -euo pipefail | |
apks=$(find . -type f -path "*/build/outputs/apk/debug/*-debug.apk" -printf '{"path":"%p","name":"%f"},' | sed 's/,$//' | awk '{print "[" $0 "]"}') | |
if [ -z "$apks" ] || [ "$apks" = "[]" ]; then | |
echo "No APKs found!" | |
exit 1 | |
fi | |
echo "artifact_paths=$apks" >> $GITHUB_OUTPUT | |
cat $GITHUB_OUTPUT | |
outputs: | |
artifact-paths: ${{ steps.find_apks.outputs.artifact_paths }} | |
upload_individual_apks: | |
needs: build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
apk: ${{ fromJson(needs.build.outputs.artifact-paths) }} | |
steps: | |
- name: Download all-apks artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: all-apks.zip | |
- name: Upload single APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.apk.name }} | |
path: ${{ matrix.apk.path }} | |
if-no-files-found: error |