Skip to content

+13 links

+13 links #5080

Workflow file for this run

name: Build debug APK
on:
workflow_dispatch:
push:
branches:
- develop
pull_request:
jobs:
build-debug-apk:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v3
with:
cache-encryption-key: Da25KUVSE5jbGds2zXmfXw==
gradle-home-cache-cleanup: true
- name: Write sign info
if: github.repository_owner == 'LawnchairLauncher'
run: |
if [ ! -z "${{ secrets.KEYSTORE }}" ]; then
echo storePassword='${{ secrets.KEYSTORE_PASSWORD }}' >> keystore.properties
echo keyAlias='${{ secrets.KEY_ALIAS }}' >> keystore.properties
echo keyPassword='${{ secrets.KEY_PASSWORD }}' >> keystore.properties
echo storeFile='${{ github.workspace }}/key.jks' >> keystore.properties
echo ${{ secrets.KEYSTORE }} | base64 --decode > ${{ github.workspace }}/key.jks
fi
- name: Build debug APK
run: ./gradlew app:assembleDebug
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Debug APK
path: app/build/outputs/apk/app/debug/*.apk
check-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
- run: ./gradlew spotlessCheck
send-notifications:
runs-on: ubuntu-latest
needs: [ build-debug-apk, check-style ]
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Python packages
run: |
python -m pip install --upgrade pip
pip install gitpython requests
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: Debug APK
path: artifacts/debug-apk
- name: Send notifications
run: python send_notifications.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 }}
ARTIFACT_DIRECTORY: artifacts/debug-apk
GITHUB_REF: ${{ github.ref }}
DISCORD_CI_BOT_TOKEN: ${{ secrets.DISCORD_CI_BOT_TOKEN}}