Skip to content

Nightly

Nightly #354

Workflow file for this run

# SPDX-FileCopyrightText: 2015 - 2024 Rime community
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: Nightly
on:
workflow_dispatch:
schedule:
- cron: '0 16 * * *' # UTC 16:00 / GMT+8 0:00, daily
env:
CI_NAME: Nightly CI
jobs:
build:
if: ${{ github.repository == 'osfans/trime' && github.ref == 'refs/heads/develop' }}
runs-on: ubuntu-24.04
env:
SIGN_KEY_BASE64: ${{ secrets.SIGNING_KEY }}
SIGN_KEY_STORE_PWD: ${{ secrets.KEY_STORE_PASSWORD }}
SIGN_KEY_ALIAS: ${{ secrets.ALIAS }}
SIGN_KEY_PWD: ${{ secrets.KEY_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
# will restore cache of dependencies and wrappers
cache: 'gradle'
- name: Calculate JNI cache hash
id: cache-hash
run: |
./gradlew :app:calculateNativeCacheHash
- name: Fetch JNI cache
uses: actions/cache@v4
id: jni-cache
with:
path: "app/prebuilt"
key: ${{ runner.os }}-trime-jni-release-${{ steps.cache-hash.outputs.native-cache-hash }}
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Build Trime
run: make release
- name: Add JNI cache
if: ${{ !steps.jni-cache.outputs.cache-hit }}
run: cp -R app/build/intermediates/merged_native_libs/release/mergeReleaseNativeLibs/out/lib app/prebuilt
- name: Create Nightly release
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: nightly
prerelease: true
title: "Nightly Build"
files: |
app/build/outputs/apk/release/*.apk