10 Commits

Author SHA1 Message Date
52588a3dd5 Restore file from previous commits and fix link
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
2023-07-09 22:45:32 +07:00
c60238c508 fix youtube downloading from actions 2
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
2023-07-09 22:41:45 +07:00
02582d4598 fix youtube downloading from actions
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
2023-07-09 22:39:05 +07:00
6898697b69 implemented finding actual APK link (not BUNDLE)
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
2023-07-09 22:29:17 +07:00
79ceecf058 Fix YouTube download link
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
2023-06-11 21:00:06 +07:00
ab77af47b0 Update Build.yml 2023-03-28 15:33:24 +07:00
db5e3f387f Update README.md 2023-02-17 23:07:45 +07:00
5b0be70e7a Update
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
2023-02-09 23:24:10 +07:00
0106b5861b Update files
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
2023-02-07 15:42:14 +07:00
90b7a1d005 Update Zulu_JDK.ps1 2023-02-07 15:13:47 +07:00
9 changed files with 83 additions and 53 deletions

View File

@@ -52,13 +52,18 @@ jobs:
--apk "Temp\youtube.apk" `
--bundle "Temp\revanced-patches.jar" `
--merge "Temp\revanced-integrations.apk" `
--exclude hide-time-and-seekbar --exclude always-autorepeat --exclude hide-captions-button --exclude disable-fullscreen-panels --exclude old-quality-layout `
--exclude hide-time-and-seekbar `
--exclude always-autorepeat `
--exclude hide-captions-button `
--exclude disable-fullscreen-panels `
--exclude old-quality-layout `
--clean `
--temp-dir "Temp\Temp" `
--out "Temp\revanced.apk"
- name: Creating archive
run: |
Get-ChildItem Temp\Temp -Recurse -Force
$Parameters = @{
Path = "Temp\revanced.apk", "Temp\microg.apk"
DestinationPath = "ReVanced.zip"
@@ -71,13 +76,9 @@ jobs:
id: read_release
run: |
# https://en.wikipedia.org/wiki/Percent-encoding
$Release = (Get-Content -Path ReleaseNotesTemplate.md -Encoding utf8 -Raw).replace("`n", "%0A").replace("`r", "%0D").replace("YouTubeTag", "${{ env.LatestSupportedYT }}").replace("CLITag", "${{ env.CLIvtag }}").replace("PatchesTag", "${{ env.Patchesvtag }}").replace("IntegrationsTag", "${{ env.IntegrationsTag }}").replace("MicroGTag", "${{ env.MicroGTag }}").replace("ZuluTag", "${{ env.ZuluTag }}")
(Get-Content -Path ReleaseNotesTemplate.md -Encoding utf8 -Raw).replace("YouTubeTag", "${{ env.LatestSupportedYT }}").replace("CLITag", "${{ env.CLIvtag }}").replace("PatchesTag", "${{ env.Patchesvtag }}").replace("IntegrationsTag", "${{ env.IntegrationsTag }}").replace("MicroGTag", "${{ env.MicroGTag }}").replace("ZuluTag", "${{ env.ZuluTag }}") | Set-Content -Path ReleaseNotesTemplate.md -Encoding utf8 -Force
# https://trstringer.com/github-actions-multiline-strings/
echo "::set-output name=RELEASE_BODY::$Release"
# echo "RELEASE_BODY=$Release" >> $GITHUB_OUTPUT
# echo "RELEASE_BODY=$Release" >> $env:GITHUB_ENV
Add-Content -Path $env:GITHUB_OUTPUT -Value "ReleaseBody=ReleaseNotesTemplate.md"
$ReleaseName = Get-Date -f "yyyy.MM.dd"
echo "RELEASE_NAME=$ReleaseName" >> $env:GITHUB_ENV
@@ -87,5 +88,4 @@ jobs:
tag_name: ${{ env.RELEASE_NAME }}
token: ${{ github.token }}
files: ReVanced.zip
body: ${{ steps.read_release.outputs.RELEASE_BODY }}
# body: ${{ env.RELEASE_BODY }}
body_path: ${{ steps.read_release.outputs.ReleaseBody }}

View File

@@ -39,8 +39,30 @@ $LatestSupported = $LatestSupported.replace(".", "-")
# Get unique key to generate direct link
# https://www.apkmirror.com/apk/google-inc/youtube/
$apkMirrorLink = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupported)-release/"
$Parameters = @{
Uri = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupported)-release/youtube-$($LatestSupported)-2-android-apk-download/"
Uri = $apkMirrorLink
UseBasicParsing = $false # Disabled
Verbose = $true
}
$Request = Invoke-Webrequest @Parameters
# Trying to find correct APK link (not BUNDLE)
$nameProp = $Request.ParsedHtml.getElementsByClassName("table-row headerFont")
foreach ($element in $nameProp)
{
foreach ($child in $element.children)
{
if ($child.innerText -eq "nodpi")
{
$apkPackageLink = ($element.getElementsByTagName("a") | Select-Object -First 1).nameProp
break
}
}
}
$apkMirrorLink += $apkPackageLink # actual APK link (not BUNDLE)
$Parameters = @{
Uri = $apkMirrorLink
UseBasicParsing = $false # Disabled
Verbose = $true
}
@@ -48,7 +70,7 @@ $Request = Invoke-Webrequest @Parameters
$nameProp = $Request.ParsedHtml.getElementsByClassName("accent_bg btn btn-flat downloadButton") | ForEach-Object -Process {$_.nameProp}
$Parameters = @{
Uri = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupported)-release/youtube-$($LatestSupported)-2-android-apk-download/download/$($nameProp)"
Uri = $apkMirrorLink + "/download/$($nameProp)"
UseBasicParsing = $false # Disabled
Verbose = $true
}
@@ -71,10 +93,9 @@ $Parameters = @{
UseBasicParsing = $true
Verbose = $true
}
$Tag = (Invoke-RestMethod @Parameters).tag_name
$Tag2 = $Tag.replace("v", "")
$URL = (Invoke-RestMethod @Parameters).assets.browser_download_url
$Parameters = @{
Uri = "https://github.com/revanced/revanced-cli/releases/download/$Tag/revanced-cli-$Tag2-all.jar"
Uri = $URL
Outfile = "$WorkingFolder\ReVanced\revanced-cli.jar"
UseBasicParsing = $true
Verbose = $true
@@ -87,10 +108,9 @@ $Parameters = @{
UseBasicParsing = $true
Verbose = $true
}
$Tag = (Invoke-RestMethod @Parameters).tag_name
$Tag2 = $Tag.replace("v", "")
$URL = ((Invoke-RestMethod @Parameters).assets | Where-Object -FilterScript {$_.content_type -eq "application/java-archive"}).browser_download_url
$Parameters = @{
Uri = "https://github.com/revanced/revanced-patches/releases/download/$Tag/revanced-patches-$Tag2.jar"
Uri = $URL
Outfile = "$WorkingFolder\ReVanced\revanced-patches.jar"
UseBasicParsing = $true
Verbose = $true
@@ -103,11 +123,8 @@ $Parameters = @{
UseBasicParsing = $true
Verbose = $true
}
# $Tag = (Invoke-RestMethod @Parameters).tag_name
# $Tag2 = $Tag.replace("v", "")
$URL = (Invoke-RestMethod @Parameters).assets.browser_download_url
$Parameters = @{
# Uri = "https://github.com/revanced/revanced-integrations/releases/download/$Tag/revanced-integrations-$Tag2.apk"
Uri = $URL
Outfile = "$WorkingFolder\ReVanced\revanced-integrations.apk"
UseBasicParsing = $true
@@ -121,9 +138,9 @@ $Parameters = @{
UseBasicParsing = $true
Verbose = $true
}
$Tag = (Invoke-RestMethod @Parameters).tag_name
$URL = (Invoke-RestMethod @Parameters).assets.browser_download_url
$Parameters = @{
Uri = "https://github.com/TeamVanced/VancedMicroG/releases/download/$Tag/microg.apk"
Uri = $URL
Outfile = "$WorkingFolder\ReVanced\microg.apk"
UseBasicParsing = $true
Verbose = $true
@@ -162,7 +179,11 @@ Remove-Item -Path "$WorkingFolder\ReVanced\jdk_windows-x64_bin.zip" -Force
--apk "$WorkingFolder\ReVanced\youtube.apk" `
--bundle "$WorkingFolder\ReVanced\revanced-patches.jar" `
--merge "$WorkingFolder\ReVanced\revanced-integrations.apk" `
--exclude hide-time-and-seekbar --exclude always-autorepeat --exclude hide-captions-button --exclude disable-fullscreen-panels --exclude old-quality-layout `
--exclude hide-time-and-seekbar `
--exclude always-autorepeat `
--exclude hide-captions-button `
--exclude disable-fullscreen-panels `
--exclude old-quality-layout `
--clean `
--temp-dir "$WorkingFolder\ReVanced\Temp" `
--out "$WorkingFolder\ReVanced\revanced.apk"
@@ -171,6 +192,6 @@ Remove-Item -Path "$WorkingFolder\ReVanced\jdk_windows-x64_bin.zip" -Force
# Invoke-Item -Path "$WorkingFolder\ReVanced"
# Remove temp directory, because cli failed to clean up directory
Remove-Item -Path "$WorkingFolder\ReVanced\Temp" -Recurse -Force -Confirm:$false
# Remove-Item -Path "$WorkingFolder\ReVanced\Temp" -Recurse -Force -Confirm:$false
Write-Warning -Message "Latest available revanced.apk & microg.apk are ready in `"$WorkingFolder\ReVanced`""

View File

@@ -2,10 +2,12 @@
# ReVanced builder
Build ReVanced package (.apk) easily than ever using latest ReVanced patches and dependencies
Build ReVanced package (.apk) easily than ever using latest ReVanced patches and dependencies locally or via cloud
## Usage
### Locally
* To build `revanced.apk` locally you need just to run [`Build.ps1`](https://github.com/JDM170/ReVanced_Builder/blob/main/Build.ps1) via PowerShell;
* All [patches](https://github.com/revanced/revanced-patches) except the followings applied to `revanced.apk`:
* always-autorepeat
@@ -18,7 +20,7 @@ Build ReVanced package (.apk) easily than ever using latest ReVanced patches and
* After compiling you get `revanced.apk` & `microg.apk` ready to be installed;
* Release notes are generated dynamically using the [ReleaseNotesTemplate.md](https://github.com/JDM170/ReVanced_Builder/blob/main/ReleaseNotesTemplate.md) template.
## By using CI/CD
### By using CI/CD
```powershell
git clone https://github.com/JDM170/ReVanced_Builder

View File

@@ -4,13 +4,15 @@ $Parameters = @{
UseBasicParsing = $true
Verbose = $true
}
$MicroGTag = (Invoke-RestMethod @Parameters).tag_name
$apiResult = Invoke-RestMethod @Parameters
$URL = $apiResult.assets.browser_download_url
$TAG = $apiResult.tag_name
$Parameters = @{
Uri = "https://github.com/TeamVanced/VancedMicroG/releases/download/$MicroGTag/microg.apk"
Outfile = "Temp\microg.apk"
UseBasicParsing = $true
Verbose = $true
Uri = $URL
Outfile = "Temp\microg.apk"
UseBasicParsing = $true
Verbose = $true
}
Invoke-RestMethod @Parameters
echo "MicroGTag=$MicroGTag" >> $env:GITHUB_ENV
echo "MicroGTag=$TAG" >> $env:GITHUB_ENV

View File

@@ -4,14 +4,15 @@ $Parameters = @{
UseBasicParsing = $true
Verbose = $true
}
$CLIvtag = (Invoke-RestMethod @Parameters).tag_name
$CLItag = $CLIvtag.replace("v", "")
$apiResult = Invoke-RestMethod @Parameters
$URL = $apiResult.assets.browser_download_url
$TAG = $apiResult.tag_name
$Parameters = @{
Uri = "https://github.com/revanced/revanced-cli/releases/download/$CLIvtag/revanced-cli-$CLItag-all.jar"
Uri = $URL
Outfile = "Temp\revanced-cli.jar"
UseBasicParsing = $true
Verbose = $true
}
Invoke-RestMethod @Parameters
echo "CLIvtag=$CLIvtag" >> $env:GITHUB_ENV
echo "CLIvtag=$TAG" >> $env:GITHUB_ENV

View File

@@ -5,14 +5,14 @@ $Parameters = @{
Verbose = $true
}
$apiResult = Invoke-RestMethod @Parameters
$IntegrationsTag = $apiResult.tag_name
$URL = $apiResult.assets.browser_download_url
$TAG = $apiResult.tag_name
$Parameters = @{
# Uri = "https://github.com/revanced/revanced-integrations/releases/download/$Tag/revanced-integrations-$Tag2.apk"
Uri = $apiResult.assets.browser_download_url
Uri = $URL
Outfile = "Temp\revanced-integrations.apk"
UseBasicParsing = $true
Verbose = $true
}
Invoke-RestMethod @Parameters
echo "IntegrationsTag=$IntegrationsTag" >> $env:GITHUB_ENV
echo "IntegrationsTag=$TAG" >> $env:GITHUB_ENV

View File

@@ -4,14 +4,18 @@ $Parameters = @{
UseBasicParsing = $true
Verbose = $true
}
$Patchesvtag = (Invoke-RestMethod @Parameters).tag_name
$Patchestag = $Patchesvtag.replace("v", "")
# $Patchesvtag = (Invoke-RestMethod @Parameters).tag_name
# $Patchestag = $Patchesvtag.replace("v", "")
$apiResult = Invoke-RestMethod @Parameters
$URL = ($apiResult.assets | Where-Object -FilterScript {$_.content_type -eq "application/java-archive"}).browser_download_url
$TAG = $apiResult.tag_name
$Parameters = @{
Uri = "https://github.com/revanced/revanced-patches/releases/download/$Patchesvtag/revanced-patches-$Patchestag.jar"
# Uri = "https://github.com/revanced/revanced-patches/releases/download/$Patchesvtag/revanced-patches-$Patchestag.jar"
Uri = $URL
Outfile = "Temp\revanced-patches.jar"
UseBasicParsing = $true
Verbose = $true
}
Invoke-RestMethod @Parameters
echo "Patchesvtag=$Patchesvtag" >> $env:GITHUB_ENV
echo "Patchesvtag=$TAG" >> $env:GITHUB_ENV

View File

@@ -15,8 +15,10 @@ Add-Type -Path $AngleSharpAssemblyPath
# Get unique key to generate direct link
# https://www.apkmirror.com/apk/google-inc/youtube/
$apkMirrorLink = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupported)-release/youtube-$($LatestSupported)-2-android-apk-download/"
# $apkMirrorLink = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupported)-release/youtube-$($LatestSupported)-android-apk-download/"
$Parameters = @{
Uri = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupportedYT)-release/youtube-$($LatestSupportedYT)-2-android-apk-download/"
Uri = $apkMirrorLink
UseBasicParsing = $false # Disabled
Verbose = $true
}
@@ -25,7 +27,7 @@ $Parsed = (New-Object -TypeName AngleSharp.Html.Parser.HtmlParser).ParseDocument
$Key = $Parsed.All | Where-Object -FilterScript {$_.ClassName -match "accent_bg btn btn-flat downloadButton"} | ForEach-Object -Process {$_.Search}
$Parameters = @{
Uri = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupportedYT)-release/youtube-$($LatestSupportedYT)-2-android-apk-download/download/$($Key)"
Uri = $apkMirrorLink + "download/$($Key)"
UseBasicParsing = $true
Verbose = $true
}
@@ -42,4 +44,4 @@ $Parameters = @{
}
Invoke-Webrequest @Parameters
echo "LatestSupportedYT=$LatestSupportedYT" >> $env:GITHUB_ENV
echo "LatestSupportedYT=$LatestSupportedYT" >> $env:GITHUB_ENV

View File

@@ -4,11 +4,9 @@ $Parameters = @{
UseBasicParsing = $true
Verbose = $true
}
# $URL = (Invoke-RestMethod @Parameters).architecture."64bit".url
# $ZuluTag = (Invoke-RestMethod @Parameters).version
$result = Invoke-RestMethod @Parameters
$URL = $result.architecture."64bit".url
$ZuluTag = $result.version
$apiResult = Invoke-RestMethod @Parameters
$URL = $apiResult.architecture."64bit".url
$TAG = $apiResult.version
$Parameters = @{
Uri = $URL
Outfile = "Temp\jdk_windows-x64_bin.zip"
@@ -17,7 +15,7 @@ $Parameters = @{
}
Invoke-RestMethod @Parameters
echo "ZuluTag=$ZuluTag" >> $env:GITHUB_ENV
echo "ZuluTag=$TAG" >> $env:GITHUB_ENV
Write-Verbose -Message "Expanding Zulu JDK" -Verbose