Skip to content

Commit 7ae0497

Browse files
ci: remove 3rd party js from windows dll gha job
We can use vswhere.exe directly to create a vs developer prompt and so can remove this third party dependency. Co-authored-by: David Gumberg <[email protected]>
1 parent 1444ed8 commit 7ae0497

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,15 @@ jobs:
211211
steps:
212212
- *CHECKOUT
213213

214-
- name: Configure Developer Command Prompt for Microsoft Visual C++
215-
# Using microsoft/setup-msbuild is not enough.
216-
uses: ilammy/msvc-dev-cmd@v1
217-
with:
218-
arch: x64
214+
- name: Set up VS Developer Prompt
215+
shell: pwsh -Command "$PSVersionTable; $PSNativeCommandUseErrorActionPreference = $true; $ErrorActionPreference = 'Stop'; & '{0}'"
216+
run: |
217+
$vswherePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
218+
$installationPath = & $vswherePath -latest -property installationPath
219+
& "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | foreach-object {
220+
$name, $value = $_ -split '=', 2
221+
echo "$name=$value" >> $env:GITHUB_ENV
222+
}
219223
220224
- name: Get tool information
221225
shell: pwsh

0 commit comments

Comments
 (0)