From 716d1f3eeef18c8cdbe05cbc7713e97d5d66cfb2 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Tue, 12 Mar 2024 22:28:14 +0800 Subject: [PATCH] :construction_worker: Fix action download apk --- .github/workflows/ds.yml | 3 ++- compiler/ds/download.sh | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 compiler/ds/download.sh diff --git a/.github/workflows/ds.yml b/.github/workflows/ds.yml index aa70832..35d25c6 100644 --- a/.github/workflows/ds.yml +++ b/.github/workflows/ds.yml @@ -30,7 +30,8 @@ jobs: - name: Download apk run: | cd compiler/ds - 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 mihoyobbs.apk + chmod +x download.sh + ./download.sh - name: Parse apk run: | cd compiler/ds diff --git a/compiler/ds/download.sh b/compiler/ds/download.sh new file mode 100644 index 0000000..4a9528f --- /dev/null +++ b/compiler/ds/download.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# shellcheck disable=SC2154 +jsonData="$(curl -X GET "https://api-takumi.miyoushe.com/ptolemaios_api/api/getLatestRelease" -H "x-rpc-client_type: 2" -H "x-rpc-app_version: 2.67.1" -H "x-rpc-channel: miyousheluodi" -H "x-rpc-h265_supported: 1" -H "referer: https://app.mihoyo.com" -H "x-rpc-verify_key: bll8iq97cem8" -H "x-rpc-csm_source: " -H "user-agent: okhttp/4.9.3")" +url="$(echo "$jsonData" | jq --raw-output '.data.package_url')" +curl -o mihoyobbs.apk "$url"