add actions
This commit is contained in:
parent
ec740a6867
commit
7b14ecf938
67
.github/workflows/Android.yml
vendored
Normal file
67
.github/workflows/Android.yml
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
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 }}
|
||||
|
||||
- name: Build with Gradle
|
||||
if: success()
|
||||
id: lspatch
|
||||
run: |
|
||||
cd data
|
||||
wget https://projecta-common-1258344701.cos.ap-singapore.myqcloud.com/apkpure_upload_20220331/genshin-impact.apk
|
||||
echo "${{ secrets.SIGNING_KEY }}" | base64 > genshin.jks
|
||||
java -jar lspatch.jar genshin-impact.apk -m ${{ steps.sign_release.outputs.signedReleaseFile }} -o genshin-impact-lspatch.apk -k genshin.jks ${{ secrets.KEY_STORE_PASSWORD }} key0 ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
|
||||
- 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
|
||||
path: ./data/genshin-impact-lspatch.apk
|
@ -7,7 +7,7 @@ android {
|
||||
compileSdk 32
|
||||
|
||||
defaultConfig {
|
||||
applicationId "xfk233.workwx"
|
||||
applicationId "xfk233.genshinproxy"
|
||||
minSdk 27
|
||||
targetSdk 32
|
||||
versionCode 1
|
||||
|
BIN
data/lspatch.jar
Normal file
BIN
data/lspatch.jar
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user