Use SDK-style project files #13
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 Program | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- "**.cs" | |
- "**.csproj" | |
- "**.resx" | |
jobs: | |
build: | |
strategy: | |
matrix: | |
configuration: [Debug, Release] | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
- name: Setup MSBuild path | |
uses: microsoft/setup-msbuild@v2 | |
- name: Setup NuGet | |
uses: nuget/setup-nuget@v2 | |
- name: Restore NuGet packages for solution | |
run: nuget restore MSIFanControl.sln | |
- name: Build solution | |
run: msbuild.exe MSIFanControl.sln /nologo /nr:false /p:DeployOnBuild=true /p:platform="Any CPU" /p:configuration="${{ matrix.configuration }}" | |
- name: Copy fan configs to build path | |
run: mkdir MSIFanControl.GUI\bin\${{ matrix.configuration }}\net48\Configs && copy Configs\* MSIFanControl.GUI\bin\${{ matrix.configuration }}\Configs\net48 | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "MSIFanControl-${{ matrix.configuration }}" | |
path: "./MSIFanControl.GUI/bin/${{ matrix.configuration }}/net48/" | |
compression-level: 9 |