Update: microg downloading; workflow; readme.md

Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
2024-05-01 12:23:22 +07:00
parent db4d8ea6a3
commit 2aa6170830
4 changed files with 29 additions and 18 deletions

View File

@@ -56,7 +56,7 @@ jobs:
run: | run: |
Get-ChildItem Temp\Temp -Recurse -Force Get-ChildItem Temp\Temp -Recurse -Force
$Parameters = @{ $Parameters = @{
Path = "Temp\revanced.apk", "Temp\microg.apk" Path = "Temp\revanced.apk", "Temp\microg.apk", "Temp\microg-hw.apk"
DestinationPath = "ReVanced.zip" DestinationPath = "ReVanced.zip"
CompressionLevel = "Fastest" CompressionLevel = "Fastest"
Force = $true Force = $true

View File

@@ -112,14 +112,21 @@ $Parameters = @{
UseBasicParsing = $true UseBasicParsing = $true
Verbose = $true Verbose = $true
} }
$URL = (Invoke-RestMethod @Parameters).assets.browser_download_url $URL = (Invoke-RestMethod @Parameters).assets
foreach($url in $URL) {
if ($url.name.Contains("-hw-")) {
$url.name = "microg-hw.apk"
} else {
$url.name = "microg.apk"
}
$Parameters = @{ $Parameters = @{
Uri = $URL Uri = $url.browser_download_url
Outfile = "$WorkingFolder\ReVanced\microg.apk" Outfile = "$WorkingFolder\ReVanced\$($url.name)"
UseBasicParsing = $true UseBasicParsing = $true
Verbose = $true Verbose = $true
} }
Invoke-RestMethod @Parameters Invoke-RestMethod @Parameters
}
# Sometimes older version of zulu-jdk causes conflict, so remove older version before proceeding. # Sometimes older version of zulu-jdk causes conflict, so remove older version before proceeding.
if (Test-Path -Path "$WorkingFolder\ReVanced\jdk") if (Test-Path -Path "$WorkingFolder\ReVanced\jdk")

View File

@@ -30,9 +30,7 @@ Trigger the [`Build`](https://github.com/JDM170/ReVanced_Builder/actions/workflo
## Requirements if you compile locally ## Requirements if you compile locally
* Windows 10 x64 or Windows 11 * Windows 10 x64 or Windows 11
* Windows PowerShell 5.1 * Windows PowerShell 5.1/7
* PowerShell 7 won't work due to it doesn't contain Trident HTML parser, so I have to use a 3rd party parser [AngleSharp](https://github.com/AngleSharp/AngleSharp);
* If you still want it, [get](https://github.com/JDM170/ReVanced_Builder/blob/main/.github/workflows/Build.yml) code from Actions (it's run in PowerShell 7).
## Links ## Links

View File

@@ -5,14 +5,20 @@ $Parameters = @{
Verbose = $true Verbose = $true
} }
$apiResult = Invoke-RestMethod @Parameters $apiResult = Invoke-RestMethod @Parameters
$URL = $apiResult.assets.browser_download_url
$TAG = $apiResult.tag_name $TAG = $apiResult.tag_name
foreach($url in $apiResult.assets) {
if ($url.name.Contains("-hw-")) {
$url.name = "microg-hw.apk"
} else {
$url.name = "microg.apk"
}
$Parameters = @{ $Parameters = @{
Uri = $URL Uri = $url.browser_download_url
Outfile = "Temp\microg.apk" Outfile = "Temp\$($url.name)"
UseBasicParsing = $true UseBasicParsing = $true
Verbose = $true Verbose = $true
} }
Invoke-RestMethod @Parameters Invoke-RestMethod @Parameters
}
echo "MicroGTag=$TAG" >> $env:GITHUB_ENV echo "MicroGTag=$TAG" >> $env:GITHUB_ENV