Update build.yaml #2
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 | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Build with Gradle | |
run: ./gradlew lintDebug ktlintCheck | |
assemble: | |
name: Assemble | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Build with Gradle | |
run: ./gradlew assembleDebug | |
# Upload all build artifacts in separate steps. This can be shortened once https://github.com/actions/upload-artifact/pull/354 is merged. | |
- name: Upload artifact phone-libre-arm64-v8a-debug.apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: phone-libre-arm64-v8a-debug.apk | |
path: ./app/phone/build/outputs/apk/libre/debug/phone-libre-arm64-v8a-debug.apk | |
- name: Upload artifact phone-libre-armeabi-v7a-debug.apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: phone-libre-armeabi-v7a-debug.apk | |
path: ./app/phone/build/outputs/apk/libre/debug/phone-libre-armeabi-v7a-debug.apk | |
- name: Upload artifact phone-libre-x86_64-debug.apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: phone-libre-x86_64-debug.apk | |
path: ./app/phone/build/outputs/apk/libre/debug/phone-libre-x86_64-debug.apk | |
- name: Upload artifact phone-libre-x86-debug.apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: phone-libre-x86-debug.apk | |
path: ./app/phone/build/outputs/apk/libre/debug/phone-libre-x86-debug.apk | |
- name: Upload artifact tv-libre-arm64-v8a-debug.apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tv-libre-arm64-v8a-debug.apk | |
path: ./app/tv/build/outputs/apk/libre/debug/tv-libre-arm64-v8a-debug.apk | |
- name: Upload artifact tv-libre-armeabi-v7a-debug.apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tv-libre-armeabi-v7a-debug.apk | |
path: ./app/tv/build/outputs/apk/libre/debug/tv-libre-armeabi-v7a-debug.apk | |
- name: Upload artifact tv-libre-x86_64-debug.apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tv-libre-x86_64-debug.apk | |
path: ./app/tv/build/outputs/apk/libre/debug/tv-libre-x86_64-debug.apk | |
- name: Upload artifact tv-libre-x86-debug.apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tv-libre-x86-debug.apk | |
path: ./app/tv/build/outputs/apk/libre/debug/tv-libre-x86-debug.apk |