feat: 支持切换 SystemUI Hook #98
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: Android CI | |
on: | |
push: | |
branches: ["master"] | |
tags: | |
- 'v*' | |
paths-ignore: | |
- 'README.md' | |
- 'app/gradle.properties' | |
- '.github/workflows/android.yml' | |
pull_request: | |
branches: ["master"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
cache: gradle | |
- name: Cache Gradle Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
!~/.gradle/caches/build-cache-* | |
key: gradle-deps-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: gradle-deps | |
- name: Cache Gradle Builds | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches/build-cache-* | |
key: gradle-builds-${{ github.sha }} | |
- name: Initialize Submodule | |
run: | | |
git submodule init | |
git submodule update | |
- name: Grant Execute Permission to gradlew | |
run: chmod +x gradlew | |
- name: Build Project | |
run: bash ./gradlew build | |
- name: Get Release Tag Name | |
run: | | |
echo "RELEASE_TAG_NAME=$(bash ./gradlew -q getVersionCode 2>&1 | tail -n 1)" >> "$GITHUB_ENV" | |
- name: Build with Gradle and Sign | |
run: | | |
echo ${{ secrets.SIGNING_KEY }} | base64 -d > keystore.jks | |
bash ./gradlew assemble | |
env: | |
KEYSTORE_PATH: "../keystore.jks" | |
KEYSTORE_PASS: ${{ secrets.KEY_STORE_PASSWORD }} | |
KEY_ALIAS: ${{ secrets.ALIAS }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
- name: Upload CI Artifact | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: RestoreSplashScreen_Release | |
path: "app/build/outputs/apk/CI/release/*.apk" | |
- name: Create LSPosed Repository Release | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
name: ${{ github.ref_name }} | |
tag_name: ${{ env.RELEASE_TAG_NAME }} | |
repository: Xposed-Modules-Repo/com.gswxxn.restoresplashscreen | |
token: ${{ secrets.GH_TOKEN }} | |
files: "app/build/outputs/apk/app/release/*.apk" |