-
Notifications
You must be signed in to change notification settings - Fork 46
82 lines (67 loc) · 2.76 KB
/
Build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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 }}