mirror of
https://github.com/JDM170/ReVanced_Builder
synced 2025-11-29 14:41:46 +07:00
92 lines
3.1 KiB
YAML
92 lines
3.1 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
patch:
|
|
runs-on: windows-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
|
|
- name: Installing AngleSharp
|
|
run: |
|
|
Install-Package AngleSharp -Source https://www.nuget.org/api/v2 -SkipDependencies -Force
|
|
|
|
- name: Downloading YouTube
|
|
run: |
|
|
New-Item -Path Temp -ItemType Directory -Force
|
|
|
|
. Scripts\YouTube.ps1
|
|
|
|
- name: Downloading ReVanced CLI
|
|
run: |
|
|
. Scripts\ReVanced_CLI.ps1
|
|
|
|
- name: Downloading ReVanced Patches
|
|
run: |
|
|
. Scripts\ReVanced_Patches.ps1
|
|
|
|
- name: Downloading ReVanced Integrations
|
|
run: |
|
|
. Scripts\ReVanced_Intergrations.ps1
|
|
|
|
- name: Downloading Vanced MicroG
|
|
run: |
|
|
. Scripts\MicroG.ps1
|
|
|
|
- name: Downloading and expanding Zulu JDK
|
|
run: |
|
|
. Scripts\Zulu_JDK.ps1
|
|
|
|
- name: Building
|
|
run: |
|
|
$JavaPath = (Resolve-Path -Path "Temp\jdk_windows-x64_bin\zulu*win_x64\bin\java.exe").Path
|
|
|
|
& $JavaPath `
|
|
-jar "Temp\revanced-cli.jar" `
|
|
--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 `
|
|
--clean `
|
|
--temp-dir "Temp\Temp" `
|
|
--out "Temp\revanced.apk"
|
|
|
|
- name: Creating archive
|
|
run: |
|
|
$Parameters = @{
|
|
Path = "Temp\revanced.apk", "Temp\microg.apk"
|
|
DestinationPath = "ReVanced.zip"
|
|
CompressionLevel = "Fastest"
|
|
Force = $true
|
|
}
|
|
Compress-Archive @Parameters
|
|
|
|
- name: Creating Release Notes
|
|
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 }}")
|
|
|
|
# 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
|
|
|
|
$ReleaseName = Get-Date -f "yyyy.MM.dd"
|
|
echo "RELEASE_NAME=$ReleaseName" >> $env:GITHUB_ENV
|
|
|
|
- name: Uploading to Releases
|
|
uses: softprops/action-gh-release@master
|
|
with:
|
|
tag_name: ${{ env.RELEASE_NAME }}
|
|
token: ${{ github.token }}
|
|
files: ReVanced.zip
|
|
body: ${{ steps.read_release.outputs.RELEASE_BODY }}
|
|
# body: ${{ env.RELEASE_BODY }}
|