-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Commit | ||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-commit: | ||
name: Build Commit | ||
uses: ./.github/workflows/core.yaml | ||
with: | ||
tasklist-filepath: "./task-list.json" | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: "Core" | ||
on: | ||
workflow_call: | ||
inputs: | ||
tasklist-filepath: | ||
required: false | ||
type: "string" | ||
is-release: | ||
required: true | ||
type: "boolean" | ||
default: false | ||
|
||
jobs: | ||
job-init: | ||
runs-on: "ubuntu-latest" | ||
outputs: | ||
result: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v3" | ||
- id: "set-matrix" | ||
run: | | ||
echo "matrix="`cat ${{ inputs.tasklist-filepath }} `"">> $GITHUB_OUTPUT | ||
job_patch: | ||
needs: job-init | ||
runs-on: "ubuntu-latest" | ||
continue-on-error: true | ||
strategy: | ||
matrix: ${{ fromJSON(needs.job-init.outputs.result) }} | ||
name: ${{ matrix.nickname }} | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
- name: "Setup JDK" | ||
uses: "actions/setup-java@v4" | ||
with: | ||
java-version: "17" | ||
#cache: "gradle" | ||
java-package: "jdk" | ||
distribution: "liberica" | ||
- name: "Get Apk Download URL (from WanDouJia)" | ||
if: ${{ matrix.type == 'wandoujia' }} | ||
id: get-download-url | ||
run: | | ||
# 点我展开 | ||
if [[ ${{matrix.data.history_id_num}} == "" ]]; then | ||
echo "url=`curl -s $(curl -s "https://www.wandoujia.com/apps/${{matrix.data.app_id_num}}" \ | ||
| grep "history_" | head -n1 | awk '$1=$1' | sed -e 's/.*href="\(.*\)\" .*/\1/') \ | ||
| grep "data-href" | head -n1 | awk '$1=$1'| sed -e 's/.*href="\(.*\)\" .*/\1/'`" >> $GITHUB_OUTPUT | ||
else | ||
echo "url=`curl -s "https://www.wandoujia.com/apps/${{matrix.data.app_id_num}}/history_v${{matrix.data.history_id_num}}" \ | ||
| grep "data-href" | head -n1 | awk '$1=$1'| sed -e 's/.*href="\(.*\)\" .*/\1/' >> $GITHUB_OUTPUT | ||
- name: "Downloading Apk File" | ||
run: | | ||
# 点我展开 | ||
wget -O "temp.apk" "${{steps.get-download-url.outputs.url}}" | ||
- name: "Get Apk Info" | ||
id: "apk-info" | ||
uses: "JantHsueh/get-apk-info-action@master" | ||
with: | ||
apkPath: "temp.apk" | ||
#应用名:${{steps.apk-info.outputs.name}} | ||
#版本号:${{steps.apk-info.outputs.versionCode}} | ||
- name: "Patch LSPatch Lib" | ||
run: | | ||
new-filename="${{steps.apk-info.outputs.name}}-${{steps.apk-info.outputs.versionCode}}.apk" | ||
cp temp.apk $new-filename | ||
java -jar ./lspatch.jar -v true -l 2 -o "output/LSPatch" $new-filename | ||
- name: "Publish to Github Artifact" | ||
uses: "actions/upload-artifact@v3" | ||
with: | ||
name: ${{steps.apk-info.outputs.name}} | ||
path: output | ||
|
||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"include": [ | ||
{ | ||
"nickname": "支付宝", | ||
"type": "wandoujia", | ||
"data": { | ||
"app_id_num":"279979", | ||
"history_id_num":"" | ||
} | ||
} | ||
] | ||
} |