auto sign

This commit is contained in:
HolographicHat 2022-11-23 10:03:50 +08:00
parent bf8073a331
commit f56f53cda4
No known key found for this signature in database
GPG Key ID: 12C8B5B85E5CE5C3
3 changed files with 12 additions and 3 deletions

BIN
.github/signkey.jks vendored Normal file

Binary file not shown.

View File

@ -7,10 +7,9 @@ on:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
@ -27,7 +26,7 @@ jobs:
- name: Download package
run: "curl -H 'x-rpc-client_type: 2' -H 'x-rpc-app_version: 2.37.1' -H 'x-rpc-channel: miyousheluodi' https://api-takumi.mihoyo.com/ptolemaios/api/getLatestRelease | jq --raw-output '.data.package_url' | xargs curl -o origin.apk"
- name: Patch package
run: "java -jar gradle/lspatch/jar-v0.5.1-361-release.jar -f -l 2 -m app/build/outputs/apk/release/app-release-unsigned.apk -o pout origin.apk"
run: "java -jar gradle/lspatch/jar-v0.5.1-361-release.jar -f -l 2 -m app/build/outputs/apk/release/app-release.apk -o pout origin.apk"
- name: Upload build artifacts
uses: actions/upload-artifact@v3.1.0
with:

View File

@ -19,10 +19,20 @@ android {
}
}
signingConfigs {
release {
storeFile file('.github/signkey.jks')
keyAlias System.getenv("SIGNING_KEY_ALIAS")
keyPassword System.getenv("SIGNING_KEY_PASSWORD")
storePassword System.getenv("SIGNING_KEY_PASSWORD")
}
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}