Merge branch '2024' of https://github.com/BytingBulldogs3539/Motion-P… #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Installer | |
on: | |
push: | |
branches: [ "2024", "2023" ] | |
pull_request: | |
branches: [ "2024", "2023" ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
configuration: [Release] | |
runs-on: windows-latest # For a list of available runner types, refer to | |
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# Install the .NET Core workload | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: setup-msbuild | |
uses: microsoft/[email protected] | |
- name: Set VS.net environment | |
run: cmd.exe /C CALL "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat" | |
- name: Build VSTO | |
run: msbuild ${{github.workspace}}\Motion-Profile-Mapper\Motion-Profile-Mapper.sln -t:restore,build -p:RestorePackagesConfig=true /p:Platform="Any CPU" /p:Configuration=${{ matrix.configuration }} /nologo /nr:false /p:VisualStudioVersion="19.0" | |
- name: Setup VS Dev Environment | |
uses: seanmiddleditch/gha-setup-vsdevenv@v4 | |
- name: DisableOutOfProc Fix | |
run: | | |
function Invoke-DisableOutOfProcBuild { | |
param (); | |
$visualStudioWherePath = ('{0}/Microsoft Visual Studio/Installer/vswhere.exe' -f ${Env:ProgramFiles(x86)}); | |
$visualStudioInstallationPath = & $visualStudioWherePath -latest -products 'Microsoft.VisualStudio.Product.Enterprise' -property 'installationPath'; | |
$currentWorkingDirectory = ('{0}/Common7/IDE/CommonExtensions/Microsoft/VSI/DisableOutOfProcBuild' -f $visualStudioInstallationPath); | |
Set-Location -Path $currentWorkingDirectory; | |
$disableOutOfProcBuildPath = ('{0}/DisableOutOfProcBuild.exe' -f $currentWorkingDirectory); | |
& $disableOutOfProcBuildPath; | |
return; | |
} | |
Invoke-DisableOutOfProcBuild | |
- name: Build installer | |
run: cd ${{github.workspace}}\Motion-Profile-Mapper\ && devenv.com ${{github.workspace}}\Motion-Profile-Mapper\Motion-Profile-Mapper-Installer\Motion-Profile-Mapper-Installer.vdproj /build "${{ matrix.configuration }}|Any CPU" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Motion-Profiler-Installer.msi | |
path: ${{github.workspace}}\Motion-Profile-Mapper\Motion-Profile-Mapper-Installer\${{ matrix.configuration }}\Motion-Profiler-Installer.msi | |