Update information to LC15 #1630
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- '*-dev' | |
paths-ignore: | |
- '.idea/**' | |
- '.gitattributes' | |
- '.github/**.json' | |
- '.gitignore' | |
- '.gitmodules' | |
- '**.md' | |
- 'LICENSE' | |
- 'NOTICE' | |
pull_request: | |
paths-ignore: | |
- '.idea/**' | |
- '.gitattributes' | |
- '.github/**.json' | |
- '.gitignore' | |
- '.gitmodules' | |
- '**.md' | |
- 'LICENSE' | |
- 'NOTICE' | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
build-debug-apk: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 21 | |
- uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-encryption-key: Da25KUVSE5jbGds2zXmfXw== | |
- 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 assembleLawnWithQuickstepGithubDebug assembleLawnWithQuickstepPlayDebug | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Debug APK | |
path: build/outputs/apk/**/*.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@v4 | |
- run: ./gradlew spotlessCheck | |
send-notifications: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'LawnchairLauncher' | |
needs: build-debug-apk | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- 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 ci.py | |
env: | |
GITHUB_EVENT_BEFORE: ${{ github.event.before }} | |
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_CI_BOT_TOKEN }} | |
TELEGRAM_CI_CHANNEL_ID: ${{ secrets.TELEGRAM_CI_CHANNEL_ID }} | |
TELEGRAM_TEAM_GROUP_ID: ${{ secrets.NOTIFY_CHANNEL_ID }} | |
ARTIFACT_DIRECTORY: artifacts/debug-apk | |
GITHUB_REF: ${{ github.ref }} | |
ACTION: internal_notifications | |
crowdin-auto-merge: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.user.login == 'lawnchair-bot' && github.event.pull_request.title == 'New Crowdin translations by Github Action' | |
needs: build-debug-apk | |
steps: | |
- env: | |
GH_TOKEN: ${{ secrets.LAWNCHAIR_BOT_TOKEN }} | |
PR_URL: ${{ github.event.pull_request.html_url }} | |
run: | | |
gh pr comment $PR_URL --body "No issues found, auto-merging the Crowdin pull request." | |
gh pr merge $PR_URL --auto --squash --delete-branch | |
nightly-release: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'LawnchairLauncher' && github.event_name == 'push' && github.ref == 'refs/heads/14-dev' | |
needs: build-debug-apk | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
# Note the # and () symbols are not supported in GitHub Release filenames, even manually | |
- name: Export APK_NAME for later use | |
run: echo "APK_NAME=Lawnchair.Debug.${{ github.ref_name }}.Nightly-CI_${{ github.run_number }}-$(echo ${{ github.sha }} | cut -c1-7).apk" >> $GITHUB_ENV | |
- name: Rename .apk file | |
run: mv "./Debug APK/lawnWithQuickstepGithub/debug/"*.apk "./$APK_NAME" | |
- name: Delete release if exist then create release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release view "nightly" && gh release delete "nightly" -y --cleanup-tag | |
gh release create "nightly" "./$APK_NAME" -p -t "Lawnchair Nightly" --generate-notes |