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" ] branches: [ "master" ]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up JDK 11 - name: Set up JDK 11
@ -27,7 +26,7 @@ jobs:
- name: Download package - 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" 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 - 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 - name: Upload build artifacts
uses: actions/upload-artifact@v3.1.0 uses: actions/upload-artifact@v3.1.0
with: 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 { buildTypes {
release { release {
minifyEnabled true minifyEnabled true
shrinkResources true shrinkResources true
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} }
} }