Skip to content

Update Build.yml

Update Build.yml #104

Workflow file for this run

name: Build
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
patch:
runs-on: windows-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@main
- name: YouTube
run: |
New-Item -Path ReVancedTemp -ItemType Directory -Force
. Scripts\YouTube.ps1
- name: ReVanced CLI
run: |
. Scripts\ReVanced_CLI.ps1
- name: Downloading ReVancedTemp Patches
run: |
. Scripts\ReVanced_Patches.ps1
- name: ReVanced Integrations
run: |
. Scripts\ReVanced_Intergrations.ps1
- name: Vanced MicroG
run: |
. Scripts\MicroG.ps1
- name: Zulu JDK
run: |
. Scripts\Zulu_JDK.ps1
- name: Building
run: |
# https://github.com/revanced/revanced-patches
& "$env:ProgramFiles\Zulu\zulu*\bin\java.exe" `
-jar "ReVancedTemp\revanced-cli.jar" `
patch "ReVancedTemp\youtube.apk" `
--patch-bundle "ReVancedTemp\revanced-patches.jar" `
--merge "ReVancedTemp\revanced-integrations.apk" `
--exclude comments --exclude premium-heading --exclude hide-captions-button --exclude disable-fullscreen-panels `
--purge `
--out "ReVancedTemp\revanced.apk"
- name: Creating archive
run: |
$Parameters = @{
Path = "ReVancedTemp\revanced.apk", "ReVancedTemp\microg.apk"
DestinationPath = "ReVanced.zip"
CompressionLevel = "Fastest"
Force = $true
}
Compress-Archive @Parameters
- name: ReleaseNotesTemplate
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: Uploading
uses: softprops/action-gh-release@master
with:
name: ${{ env.RELEASE_NAME }}
token: ${{ github.token }}
files: ReVanced.zip
body_path: ${{ steps.read_release.outputs.ReleaseBody }}