fix field name

This commit is contained in:
HolographicHat 2022-11-23 12:31:13 +08:00
parent d88c1f9ec5
commit 2693fcd5c5
No known key found for this signature in database
GPG Key ID: 12C8B5B85E5CE5C3
2 changed files with 17 additions and 10 deletions

View File

@ -1,6 +1,7 @@
name: Android CI name: Android CI
on: on:
workflow_dispatch:
push: push:
branches: [ "master" ] branches: [ "master" ]
pull_request: pull_request:
@ -14,7 +15,8 @@ jobs:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
steps: steps:
- uses: actions/checkout@v3 - name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
@ -25,18 +27,22 @@ jobs:
run: chmod +x gradlew run: chmod +x gradlew
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew assembleRelease run: ./gradlew assembleRelease
- run: sudo apt-get install -y jq - name: Install jq
run: sudo apt-get install -y jq
- 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.apk -o pout origin.apk" run: "mkdir out && mv app/build/outputs/apk/release/app-release.apk out && java -jar gradle/lspatch/jar-v0.5.1-361-release.jar -f -l 2 -m -o out 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:
name: Artifacts name: Artifacts
path: app/build/outputs/apk/release/app-release-unsigned.apk path: out
- name: Upload patched package #- name: Set up Node 16
uses: actions/upload-artifact@v3.1.0 # uses: actions/setup-node@v3
with: # with:
name: Artifacts # node-version: 16
path: pout #- name: Install depencies
# run: npm install axios@0.27.2
#- name: Run post build script
# run:

View File

@ -109,9 +109,10 @@ private fun TokenActivity.Content(accountInfo: AccountInfo) = Column(
onClick = { onClick = {
runCatching { runCatching {
val authStr = buildMap { val authStr = buildMap {
put("uid", accountInfo.uid) put("ltuid", accountInfo.uid)
put("ltoken", accountInfo.lToken) put("ltoken", accountInfo.lToken)
if (grantSToken) { if (grantSToken) {
put("stuid", accountInfo.uid)
put("mid", accountInfo.mid) put("mid", accountInfo.mid)
put("stoken", accountInfo.sToken) put("stoken", accountInfo.sToken)
} }