feat: do not rely on chocolatey to install Google Chrome Beta (#6735)

This commit is contained in:
Andrey Lushnikov 2021-05-25 17:32:08 -07:00 committed by GitHub
parent 24a2326031
commit c60974d922
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 4 deletions

View file

@ -476,13 +476,12 @@ jobs:
name: "Chrome Beta (Win)"
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install Chrome Beta
run: pwsh -command ".\$GITHUB_WORKSPACE\utils\install-chrome-beta\reinstall_win.ps1"
- name: Install Media Pack
shell: powershell
run: Install-WindowsFeature Server-Media-Foundation
- name: Install Chrome Beta
shell: powershell
run: choco install -y googlechromebeta --pre --force
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12

View file

@ -0,0 +1,20 @@
$url = 'https://dl.google.com/tag/s/dl/chrome/install/beta/googlechromebetastandaloneenterprise.msi';
if ([Environment]::Is64BitProcess) {
$url = 'https://dl.google.com/tag/s/dl/chrome/install/beta/googlechromebetastandaloneenterprise64.msi'
}
$app = Get-WmiObject -Class Win32_Product | Where-Object {
$_.Name -match "Google Chrome Beta"
}
if ($app) {
$app.Uninstall()
}
$wc = New-Object net.webclient
$msiInstaller = "$env:temp\google-chrome-beta.msi"
Remove-Item $msiInstaller
$wc.Downloadfile($url, $msiInstaller)
$arguments = "/i `"$msiInstaller`" /quiet"
Start-Process msiexec.exe -ArgumentList $arguments -Wait