feat: do not rely on chocolatey to install Google Chrome Beta (#6735)
This commit is contained in:
parent
24a2326031
commit
c60974d922
7
.github/workflows/tests_secondary.yml
vendored
7
.github/workflows/tests_secondary.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
20
utils/install-chrome-beta/reinstall_win.ps1
Normal file
20
utils/install-chrome-beta/reinstall_win.ps1
Normal 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
|
||||
Loading…
Reference in a new issue