mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
91 lines
2.7 KiB
YAML
91 lines
2.7 KiB
YAML
name: Build debug APK
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- 11-dev
|
|
|
|
jobs:
|
|
build-debug-apk:
|
|
runs-on: ubuntu-latest
|
|
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: Sign debug APK
|
|
uses: r0adkll/sign-android-release@v1
|
|
id: sign-debug-apk
|
|
with:
|
|
releaseDirectory: build/outputs/apk/lawnWithQuickstep/debug
|
|
signingKeyBase64: ${{ secrets.KEYSTORE }}
|
|
alias: ${{ secrets.KEY_ALIAS }}
|
|
keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
|
|
keyPassword: ${{ secrets.KEY_PASSWORD }}
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Debug APK
|
|
path: ${{ steps.sign-debug-apk.outputs.signedReleaseFile }}
|
|
send-apk:
|
|
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 APK
|
|
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: ''
|
|
send-changelog:
|
|
runs-on: ubuntu-latest
|
|
needs: send-apk
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v2.3.4
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.x'
|
|
- name: Install Python packages
|
|
uses: BSFishy/pip-action@v1
|
|
with:
|
|
packages: |
|
|
gitpython
|
|
requests
|
|
- name: Send changelog
|
|
run: python send_changelog.py
|
|
env:
|
|
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
|
|
TELEGRAM_CI_BOT_TOKEN: ${{ secrets.TELEGRAM_CI_BOT_TOKEN }}
|
|
TELEGRAM_CI_CHANNEL_ID: ${{ secrets.TELEGRAM_CI_CHANNEL_ID }}
|
|
BRANCH: 11-dev
|