Skip to content

update microsoft/setup-msbuild in GitHub Actions #9

update microsoft/setup-msbuild in GitHub Actions

update microsoft/setup-msbuild in GitHub Actions #9

name: Build with Artifacts
on:
push:
branches:
- packtest
tags:
- 'v*'
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
configuration: [Release]
platform: [x64, ARM64]
steps:
- uses: actions/checkout@v4
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} ${{env.SOLUTION_FILE_PATH}}
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: 'Win32CaptureSample_${{ matrix.platform }}_${{ matrix.configuration }}'
path: '.\${{ matrix.platform }}\${{ matrix.configuration }}\*'