GenshinProxy/.github/workflows/Android.yml

72 lines
2.1 KiB
YAML
Raw Normal View History

2022-05-11 08:31:18 +00:00
name: Android CI
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/caches/build-cache-*
key: gradle-deps-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: gradle-deps
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: |
bash ./gradlew assembleRelease
- name: Sign Release APK
if: success()
id: sign_release
uses: r0adkll/sign-android-release@v1.0.4
with:
releaseDirectory: ./app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: key0
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_STORE_PASSWORD }}
2022-05-11 11:14:52 +00:00
- name: Download Genshin
if: success()
id: download_genshin
run: |
wget https://projecta-common-1258344701.cos.ap-singapore.myqcloud.com/apkpure_upload_20220331/genshin-impact.apk
2022-05-11 08:38:54 +00:00
- name: Lspatch
2022-05-11 08:31:18 +00:00
if: success()
id: lspatch
run: |
2022-05-11 11:14:52 +00:00
java -jar lspatch.jar genshin-impact.apk -m ${{ steps.sign_release.outputs.signedReleaseFile }} -k ./app/build/outputs/apk/release/signingKey.jks ${{ secrets.KEY_STORE_PASSWORD }} key0 ${{ secrets.KEY_STORE_PASSWORD }}
2022-05-11 08:31:18 +00:00
- name: Upload Release APK
uses: actions/upload-artifact@v2
with:
name: GenshinProxy_release
path: ${{ steps.sign_release.outputs.signedReleaseFile }}
- name: Upload Lspatch APK
uses: actions/upload-artifact@v2
with:
name: GenshinProxy_release_lspatch
2022-05-11 11:23:11 +00:00
path: ./genshin-impact-lv0-lspatched.apk