Switch-Gift-Data-Manager/.github/workflows/Windows.yml
2024-06-10 15:50:34 +02:00

58 lines
1.2 KiB
YAML

name: Windows
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
strategy:
matrix:
configuration: [Release]
runs-on: windows-latest
env:
Solution_Name: SwitchGiftDataManager.sln
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
- name: Execute unit tests
run: dotnet test
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
- name: Create the app package
run: msbuild $env:Solution_Name /property:Configuration=Release
- name: Upload WinForms build artifacts
uses: actions/upload-artifact@v4
with:
name: WindowsForm.GUI.App
path: SwitchGiftDataManager.WinForm/bin
- name: Upload Windows CommandLine build artifacts
uses: actions/upload-artifact@v4
with:
name: Windows.CommandLine.App
path: SwitchGiftDataManager.CommandLine/bin