Skip to content

Commit

Permalink
GitHub Actions CI updates
Browse files Browse the repository at this point in the history
- Only build when updating C# source/project files

- Copy fan configs to build directory
  • Loading branch information
Sparronator9999 committed Jul 24, 2024
1 parent 4212897 commit 11a9980
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
name: Build Program
on:

on:
push:
branches: ["main"]

paths:
- "**.cs"
- "**.csproj"
- "**.resx"

jobs:
build:
strategy:
matrix:
configuration: [Debug, Release]

runs-on: windows-latest

steps:
- name: Checkout Code
- name: Checkout repository
uses: actions/checkout@v1
- name: Setup MSBuild Path

- name: Setup MSBuild path
uses: microsoft/setup-msbuild@v2

- name: Setup NuGet
uses: nuget/setup-nuget@v2

- name: Restore NuGet Packages
- name: Restore NuGet packages for solution
run: nuget restore MSIFanControl.sln
- name: Build Solution

- name: Build solution
run: msbuild.exe MSIFanControl.sln /nologo /nr:false /p:DeployOnBuild=true /p:platform="Any CPU" /p:configuration="${{ matrix.configuration }}"

- name: Upload Artifact
- name: Copy fan configs to build path
run: mkdir MSIFanControl.GUI\bin\${{ matrix.configuration }}\Configs && copy Configs\* MSIFanControl.GUI\bin\${{ matrix.configuration }}\Configs

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: "MSIFanControl-${{ matrix.configuration }}"
Expand Down

0 comments on commit 11a9980

Please sign in to comment.