Update Build.yaml

This commit is contained in:
Dmitry Nefedov
2022-08-31 12:25:36 +03:00
committed by GitHub
parent 7c51f667df
commit 5ad73c47b2

View File

@@ -76,20 +76,21 @@ jobs:
} }
Invoke-RestMethod @Parameters Invoke-RestMethod @Parameters
# https://apkpure.com/vanced-microg/com.mgoogle.android.gms # https://github.com/microg/GmsCore
$Parameters = @{ $Parameters = @{
Uri = "https://apkpure.com/vanced-microg/com.mgoogle.android.gms/download?from=details" Uri = "https://api.github.com/repos/microg/GmsCore/releases/latest"
UseBasicParsing = $true UseBasicParsing = $true
Verbose = $true Verbose = $true
} }
$URL = ((Invoke-Webrequest @Parameters).Links | Where-Object -FilterScript {$_.href -match "https://download.apkpure.com"}).href $Tag = (Invoke-RestMethod @Parameters).tag_name
$Tag2 = $Tag.replace("v", "")
$Parameters = @{ $Parameters = @{
Uri = $URL Uri = "https://github.com/microg/GmsCore/releases/download/$Tag/com.google.android.gms-$Tag2.apk"
Outfile = "$PSScriptRoot\microg.apk" Outfile = "$DownloadsFolder\ReVanced\microg.apk"
UseBasicParsing = $true UseBasicParsing = $true
Verbose = $true Verbose = $true
} }
Invoke-Webrequest @Parameters Invoke-RestMethod @Parameters
# https://github.com/ScoopInstaller/Java/blob/master/bucket/zulu-jdk.json # https://github.com/ScoopInstaller/Java/blob/master/bucket/zulu-jdk.json
$Parameters = @{ $Parameters = @{
@@ -137,6 +138,8 @@ jobs:
--temp-dir "$PSScriptRoot\Temp" ` --temp-dir "$PSScriptRoot\Temp" `
--out "$PSScriptRoot\revanced.apk" --out "$PSScriptRoot\revanced.apk"
- name: Creating archive
run: |
$Parameters = @{ $Parameters = @{
Path = "$PSScriptRoot\revanced.apk", "$PSScriptRoot\microg.apk" Path = "$PSScriptRoot\revanced.apk", "$PSScriptRoot\microg.apk"
DestinationPath = "ReVanced.zip" DestinationPath = "ReVanced.zip"
@@ -145,12 +148,11 @@ jobs:
} }
Compress-Archive @Parameters Compress-Archive @Parameters
- name: Upload ReVanced.zip to release - name: Uploading ReVanced.zip to release
uses: svenstaro/upload-release-action@master uses: svenstaro/upload-release-action@master
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ReVanced.zip file: ReVanced.zip
tag: ${{ github.ref }} tag: ${{ github.ref }}
overwrite: true overwrite: false
file_glob: true file_glob: true
prerelease: true