-
Notifications
You must be signed in to change notification settings - Fork 9
59 lines (47 loc) · 2.01 KB
/
dotnet-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# For more information on GitHub Actions, refer to https://github.com/features/actions
# For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications,
# refer to https://github.com/microsoft/github-actions-for-desktop-apps
name: .NET Desktop
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
configuration: [Release]
targetplatform: [x64]
runs-on: windows-2022 # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
env:
Solution_Name: OKEGui\OKEGui.sln # Replace with your solution name, i.e. MyWpfApp.sln.
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
- name: Restore packages
run: msbuild $env:Solution_Name /t:Restore /p:Platform=$env:TargetPlatform /p:Configuration=$env:Configuration /p:RestorePackagesConfig=True
env:
Configuration: ${{ matrix.configuration }}
TargetPlatform: ${{ matrix.targetplatform }}
# Build the Application project
- name: Build the Application Project
run: msbuild $env:Solution_Name /t:OKEGui /p:Platform=$env:TargetPlatform /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:BuildMode /p:AppxBundle=$env:AppxBundle
env:
AppxBundle: Never
BuildMode: SideloadOnly
Configuration: ${{ matrix.configuration }}
TargetPlatform: ${{ matrix.targetplatform }}
# Upload the package: https://github.com/actions/upload-artifact
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Package-${{ matrix.configuration }}
path: |
OKEGui\OKEGui\bin\${{ matrix.configuration }}\