Skip to content

Nightly

Nightly #322

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
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: Setup keystore
run: |
echo ${{ secrets.SIGNING_KEY }} | base64 --decode | cat >> $(pwd)/signingkey.jks
cat << EOF > keystore.properties
storeFile=$(pwd)/signingkey.jks
storePassword=${{ secrets.KEY_STORE_PASSWORD }}
keyAlias=${{ secrets.ALIAS }}
keyPassword=${{ secrets.KEY_PASSWORD }}
EOF
- 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