build.yml - fix for gitversioning and psscriptroot

This commit is contained in:
Caelan Sayler
2022-03-11 11:30:32 +00:00
parent c41174dbc3
commit 16c7a1f773
2 changed files with 7 additions and 0 deletions

View File

@@ -5,6 +5,8 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:

View File

@@ -2,6 +2,11 @@
$MSBuildPath = (&"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe) | Out-String
$MSBuildPath = $MSBuildPath.Trim();
# This variable is null in github actions
if ($PSScriptRoot -eq $null) {
$PSScriptRoot = "."
}
# Stop the script if an error occurs
$ErrorActionPreference = "Stop"
$In = "$PSScriptRoot\build\Release\"