mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
66 lines
2.0 KiB
YAML
66 lines
2.0 KiB
YAML
name: Build debug APK
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- 11-dev
|
|
|
|
jobs:
|
|
send-start-notification:
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
steps:
|
|
- name: Send start notification
|
|
uses: appleboy/telegram-action@v0.1.0
|
|
with:
|
|
to: ${{ secrets.TELEGRAM_CI_CHANNEL_ID }}
|
|
token: ${{ secrets.TELEGRAM_CI_BOT_TOKEN }}
|
|
message: New push to “11-dev”. Building debug APK…
|
|
build-debug-apk:
|
|
runs-on: ubuntu-latest
|
|
needs: send-start-notification
|
|
continue-on-error: true
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v2.3.4
|
|
with:
|
|
submodules: true
|
|
- name: Restore Gradle cache
|
|
uses: actions/cache@v2.1.4
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
|
restore-keys: ${{ runner.os }}-gradle-
|
|
- name: Set up Java 11
|
|
uses: actions/setup-java@v1.4.3
|
|
with:
|
|
java-version: 11
|
|
- name: Grant execution permission to Gradle Wrapper
|
|
run: chmod +x gradlew
|
|
- name: Build debug APK
|
|
run: ./gradlew assembleLawnWithQuickstepDebug
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Debug APK
|
|
path: build/outputs/apk/lawnWithQuickstep/debug/**.apk
|
|
send-end-notification:
|
|
runs-on: ubuntu-latest
|
|
needs: build-debug-apk
|
|
steps:
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: Debug APK
|
|
path: artifacts/debug-apk
|
|
- uses: technote-space/workflow-conclusion-action@v2.1.5
|
|
- name: Send notification
|
|
uses: appleboy/telegram-action@v0.1.0
|
|
with:
|
|
to: ${{ secrets.TELEGRAM_CI_CHANNEL_ID }}
|
|
token: ${{ secrets.TELEGRAM_CI_BOT_TOKEN }}
|
|
document: artifacts/debug-apk/**.apk
|
|
message: Build finished with status “${{ env.WORKFLOW_CONCLUSION }}”. Uploading APK if available… |