From 90f601d4a2ad22276d2459b1ab3bdf9734047fb2 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Tue, 1 Feb 2022 10:18:53 +0800 Subject: [PATCH 01/10] Support path with spaces Fix #206 --- .github/workflows/magisk.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/magisk.yml b/.github/workflows/magisk.yml index 24f79b0..5341d77 100644 --- a/.github/workflows/magisk.yml +++ b/.github/workflows/magisk.yml @@ -437,7 +437,7 @@ jobs: } if (-not (Test-Administrator)) { - \$proc = Start-Process -PassThru -WindowStyle Hidden -Verb RunAs powershell.exe -Args "-executionpolicy bypass -command Set-Location \`"\$PSScriptRoot\`"; \`"\$PSCommandPath\`" EVAL" + \$proc = Start-Process -PassThru -WindowStyle Hidden -Verb RunAs powershell.exe -Args "-executionpolicy bypass -command Set-Location '\$PSScriptRoot'; &'\$PSCommandPath' EVAL" \$proc.WaitForExit() if (\$proc.ExitCode -ne 0) { Clear-Host @@ -447,7 +447,7 @@ jobs: exit } elseif ((\$args.Count -eq 1) -and (\$args[0] -eq "EVAL")) { - Start-Process powershell.exe -Args "-executionpolicy bypass -command Set-Location \`"\$PSScriptRoot\`"; \`"\$PSCommandPath\`"" + Start-Process powershell.exe -Args "-executionpolicy bypass -command Set-Location '\$PSScriptRoot'; &'\$PSCommandPath'" exit } From 810f9021946f3f46578de52cafd42a96297864da Mon Sep 17 00:00:00 2001 From: alex-sandro92 <59087068+alex-sandro92@users.noreply.github.com> Date: Tue, 8 Feb 2022 22:11:42 +0100 Subject: [PATCH 02/10] Simplified the selection of the Magisk release (#220) --- .github/workflows/magisk.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/magisk.yml b/.github/workflows/magisk.yml index 5341d77..5df5e68 100644 --- a/.github/workflows/magisk.yml +++ b/.github/workflows/magisk.yml @@ -5,9 +5,9 @@ on: workflow_dispatch: inputs: magisk_apk: - description: "Download link to magisk apk." + description: "Magisk version. Should be stable, beta, canary or a download link to Magisk apk." required: true - default: "https://cdn.jsdelivr.net/gh/topjohnwu/magisk-files@24.1/app-release.apk" + default: "stable" gapps_variant: description: "Variants of gapps. Should be: [none, super, stock, full, mini, micro, nano, pico, tvstock, tvmini]" required: true @@ -109,11 +109,15 @@ jobs: import urllib.request import zipfile import os + import json + import requests magisk_apk = """${{ github.event.inputs.magisk_apk }}""" if not magisk_apk: - magisk_apk = """https://cdn.jsdelivr.net/gh/topjohnwu/magisk-files@24.1/app-release.apk""" + magisk_apk = "stable" + if magisk_apk == "stable" or magisk_apk == "beta" or magisk_apk == "canary": + magisk_apk = json.loads(requests.get(f"https://github.com/topjohnwu/magisk-files/raw/master/{magisk_apk}.json").content)['magisk']['link'] out_file = "magisk.zip" From e074dd9f860bd7c51ca0f47b82c3fd91eb0bee9d Mon Sep 17 00:00:00 2001 From: zhongfly <11155705+zhongfly@users.noreply.github.com> Date: Mon, 14 Feb 2022 02:01:53 +0800 Subject: [PATCH 03/10] Use choice as workflow inputs (#224) --- .github/workflows/magisk.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/magisk.yml b/.github/workflows/magisk.yml index 5df5e68..7f471b9 100644 --- a/.github/workflows/magisk.yml +++ b/.github/workflows/magisk.yml @@ -9,13 +9,29 @@ on: required: true default: "stable" gapps_variant: - description: "Variants of gapps. Should be: [none, super, stock, full, mini, micro, nano, pico, tvstock, tvmini]" + description: "Variants of gapps." required: true default: "none" + type: choice + options: + - none + - super + - stock + - full + - mini + - micro + - nano + - pico + - tvstock + - tvmini root_sol: - description: "Root solution. Should be: [magisk, none]" + description: "Root solution." required: true default: "magisk" + type: choice + options: + - magisk + - none jobs: build: From 09f7bd0fce9d7294dd6551d9053fb7bd802aba9f Mon Sep 17 00:00:00 2001 From: someone5678 <59456192+someone5678@users.noreply.github.com> Date: Mon, 14 Feb 2022 03:03:04 +0900 Subject: [PATCH 04/10] README: update Shamiko link and fix typo (#223) * hidding -> hiding --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ffe2b35..d552308 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ https://user-images.githubusercontent.com/5022927/145696886-e13ebfc1-ff25-4410-8 No. Magisk has bugs preventing itself running on WSA. Magisk Canary has fixed them. So try Magisk 23 canary or higher version. - But Magisk has removed hide since 23 canary? - Use [Magisk Alpha](https://t.me/magiskalpha) or use Zygisk with [Shamiko](https://t.me/c/1414270883/25744) for hidding. To intergrate Magisk Alpha, use this Magisk apk link https://github.com/vvb2060/magisk_files/raw/alpha/app-release.apk for the Github Action. + Use [Magisk Alpha](https://t.me/magiskalpha) or use Zygisk with [Shamiko](https://github.com/LSPosed/LSPosed.github.io/releases) for hiding. To intergrate Magisk Alpha, use this Magisk apk link https://github.com/vvb2060/magisk_files/raw/alpha/app-release.apk for the Github Action. - How can I get rid of Magisk? Input `none` as root solution. From d242f57139a724acd438e82e2d0ac6852f4e7d38 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Mon, 14 Feb 2022 02:09:01 +0800 Subject: [PATCH 05/10] Update README.md --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d552308..19b4f02 100644 --- a/README.md +++ b/README.md @@ -78,13 +78,10 @@ https://user-images.githubusercontent.com/5022927/145696886-e13ebfc1-ff25-4410-8 Magisk actively remove online module repository. You can install module locally or by `adb push module.zip /data/local/tmp` and `adb shell su -c magisk --install-module /data/local/tmp/module.zip`. - Can I use Magisk 23.0 stable or lower version? - No. Magisk has bugs preventing itself running on WSA. Magisk Canary has fixed them. So try Magisk 23 canary or higher version. -- But Magisk has removed hide since 23 canary? - - Use [Magisk Alpha](https://t.me/magiskalpha) or use Zygisk with [Shamiko](https://github.com/LSPosed/LSPosed.github.io/releases) for hiding. To intergrate Magisk Alpha, use this Magisk apk link https://github.com/vvb2060/magisk_files/raw/alpha/app-release.apk for the Github Action. + No. Magisk has bugs preventing itself running on WSA. Magisk 24+ has fixed them. So you must use Magisk 24 or higher version. - How can I get rid of Magisk? - Input `none` as root solution. + Choose `none` as root solution. - Github Action script is updated, how can I synchronize it? 1. In your fork repository, click `fetch upstream` From 465544ba4ee2ce87c11b8c5af66c2ba633deaf68 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Mon, 14 Feb 2022 02:15:31 +0800 Subject: [PATCH 06/10] Update magisk.yml --- .github/workflows/magisk.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/magisk.yml b/.github/workflows/magisk.yml index 7f471b9..8d9f216 100644 --- a/.github/workflows/magisk.yml +++ b/.github/workflows/magisk.yml @@ -5,11 +5,19 @@ on: workflow_dispatch: inputs: magisk_apk: - description: "Magisk version. Should be stable, beta, canary or a download link to Magisk apk." + description: "Magisk version" required: true default: "stable" + type: choice + options: + - stable + - beta + - canary + - customize + magisk_link: + description: "Download link to Magisk's apk if you are choosing customize above." gapps_variant: - description: "Variants of gapps." + description: "Variants of gapps" required: true default: "none" type: choice @@ -25,7 +33,7 @@ on: - tvstock - tvmini root_sol: - description: "Root solution." + description: "Root solution" required: true default: "magisk" type: choice @@ -130,11 +138,13 @@ jobs: magisk_apk = """${{ github.event.inputs.magisk_apk }}""" + if magisk_apk == "customize": + maigks_apk = """${{ github.event.inputs.magisk_link }}""" if not magisk_apk: magisk_apk = "stable" if magisk_apk == "stable" or magisk_apk == "beta" or magisk_apk == "canary": magisk_apk = json.loads(requests.get(f"https://github.com/topjohnwu/magisk-files/raw/master/{magisk_apk}.json").content)['magisk']['link'] - + out_file = "magisk.zip" arch = "${{ matrix.arch }}" From 80838a8be69080007d58c940ecf538a6164eb0f1 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Mon, 14 Feb 2022 02:16:53 +0800 Subject: [PATCH 07/10] Update magisk.yml --- .github/workflows/magisk.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/magisk.yml b/.github/workflows/magisk.yml index 8d9f216..3a836d3 100644 --- a/.github/workflows/magisk.yml +++ b/.github/workflows/magisk.yml @@ -13,9 +13,6 @@ on: - stable - beta - canary - - customize - magisk_link: - description: "Download link to Magisk's apk if you are choosing customize above." gapps_variant: description: "Variants of gapps" required: true @@ -138,8 +135,6 @@ jobs: magisk_apk = """${{ github.event.inputs.magisk_apk }}""" - if magisk_apk == "customize": - maigks_apk = """${{ github.event.inputs.magisk_link }}""" if not magisk_apk: magisk_apk = "stable" if magisk_apk == "stable" or magisk_apk == "beta" or magisk_apk == "canary": From 7932903baf2230b971769e9da799f8d508cf9ce4 Mon Sep 17 00:00:00 2001 From: zhongfly <11155705+zhongfly@users.noreply.github.com> Date: Thu, 17 Feb 2022 03:44:27 +0800 Subject: [PATCH 08/10] Support to choose arch (#229) --- .github/workflows/magisk.yml | 38 ++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/.github/workflows/magisk.yml b/.github/workflows/magisk.yml index 3a836d3..6db7a12 100644 --- a/.github/workflows/magisk.yml +++ b/.github/workflows/magisk.yml @@ -4,6 +4,15 @@ on: pull_request: workflow_dispatch: inputs: + arch: + description: "Build arch" + required: true + default: "x64 & arm64" + type: choice + options: + - x64 + - arm64 + - x64 & arm64 magisk_apk: description: "Magisk version" required: true @@ -39,11 +48,36 @@ on: - none jobs: + matrix: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Generate build matrix + id: set-matrix + uses: actions/github-script@v6 + with: + script: | + let matrix = {}; + let arch = "${{ github.event.inputs.arch }}" + switch ( arch ) { + case "x64": + matrix.arch = ["x64"]; + break; + case "arm64": + matrix.arch = ["arm64"]; + break; + default: + matrix.arch = ["x64", "arm64"]; + break; + } + core.setOutput("matrix",JSON.stringify(matrix)); + build: runs-on: ubuntu-20.04 + needs: matrix strategy: - matrix: - arch: [x64, arm64] + matrix: ${{fromJson(needs.matrix.outputs.matrix)}} steps: - name: Dependencies run: | From c55101a5052e573e0ab3f1880471d8f3638eb3bd Mon Sep 17 00:00:00 2001 From: zhongfly <11155705+zhongfly@users.noreply.github.com> Date: Thu, 17 Feb 2022 03:44:36 +0800 Subject: [PATCH 09/10] Don't run action if only `README.md` update (#231) --- .github/workflows/magisk.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/magisk.yml b/.github/workflows/magisk.yml index 6db7a12..a446943 100644 --- a/.github/workflows/magisk.yml +++ b/.github/workflows/magisk.yml @@ -1,7 +1,11 @@ name: Build WSA on: push: + paths-ignore: + - 'README.md' pull_request: + paths-ignore: + - 'README.md' workflow_dispatch: inputs: arch: From 9a1c2fc1b7e0f7fd86772959265fd904f5e295eb Mon Sep 17 00:00:00 2001 From: LoveSy Date: Wed, 23 Feb 2022 03:27:33 +0800 Subject: [PATCH 10/10] Suppress misleading error on stop process --- .github/workflows/magisk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/magisk.yml b/.github/workflows/magisk.yml index a446943..2fe9726 100644 --- a/.github/workflows/magisk.yml +++ b/.github/workflows/magisk.yml @@ -549,7 +549,7 @@ jobs: } Clear-Host Write-Host "Installing MagiskOnWSA..." - Stop-Process -Name "wsaclient" + Stop-Process -Name "wsaclient" -ErrorAction "silentlycontinue" Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Register .\AppxManifest.xml if (\$?) { Finish