mirror of
https://github.com/JDM170/ReVanced_Builder
synced 2025-11-29 14:41:46 +07:00
83 lines
2.8 KiB
YAML
83 lines
2.8 KiB
YAML
name: Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
patch:
|
|
runs-on: windows-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
|
|
- name: Download YouTube
|
|
run: |
|
|
New-Item -Path Temp -ItemType Directory -Force
|
|
|
|
. Scripts\YouTube.ps1
|
|
|
|
- name: Download ReVanced CLI
|
|
run: |
|
|
. Scripts\ReVanced_CLI.ps1
|
|
|
|
- name: Download ReVanced Patches
|
|
run: |
|
|
. Scripts\ReVanced_Patches.ps1
|
|
|
|
- name: Download ReVanced Integrations
|
|
run: |
|
|
. Scripts\ReVanced_Intergrations.ps1
|
|
|
|
- name: Download Vanced MicroG
|
|
run: |
|
|
. Scripts\MicroG.ps1
|
|
|
|
- name: Download and expanding Zulu JDK
|
|
run: |
|
|
. Scripts\Zulu_JDK.ps1
|
|
|
|
- name: Build
|
|
run: |
|
|
$JavaPath = (Resolve-Path -Path "Temp\jdk_windows-x64_bin\zulu*win_x64\bin\java.exe").Path
|
|
|
|
& $JavaPath `
|
|
-jar "Temp\revanced-cli.jar" patch `
|
|
--patch-bundle "Temp\revanced-patches.jar" `
|
|
--merge "Temp\revanced-integrations.apk" `
|
|
--exclude "Always repeat" `
|
|
--exclude "Hide captions button" `
|
|
--exclude "Hide timestamp" `
|
|
--exclude "Hide seekbar" `
|
|
--purge `
|
|
--out "Temp\revanced.apk" `
|
|
"Temp\youtube.apk"
|
|
# --resource-cache "Temp\Temp" `
|
|
|
|
- name: Create archive
|
|
run: |
|
|
Get-ChildItem Temp\Temp -Recurse -Force
|
|
$Parameters = @{
|
|
Path = "Temp\revanced.apk", "Temp\microg.apk"
|
|
DestinationPath = "ReVanced.zip"
|
|
CompressionLevel = "Fastest"
|
|
Force = $true
|
|
}
|
|
Compress-Archive @Parameters
|
|
|
|
- name: Create Release Notes
|
|
id: read_release
|
|
run: |
|
|
# https://en.wikipedia.org/wiki/Percent-encoding
|
|
(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/
|
|
Add-Content -Path $env:GITHUB_OUTPUT -Value "ReleaseBody=ReleaseNotesTemplate.md"
|
|
$ReleaseName = Get-Date -f "yyyy.MM.dd"
|
|
echo "RELEASE_NAME=$ReleaseName" >> $env:GITHUB_ENV
|
|
|
|
- name: Upload to Releases
|
|
uses: softprops/action-gh-release@master
|
|
with:
|
|
tag_name: ${{ env.RELEASE_NAME }}
|
|
body_path: ${{ steps.read_release.outputs.ReleaseBody }}
|
|
files: ReVanced.zip
|