-
Notifications
You must be signed in to change notification settings - Fork 10
56 lines (44 loc) · 1.2 KB
/
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
name: CI Build
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
env:
BuildConfiguration: Release
MSBuildVersion: 17.12.3.50401
jobs:
build:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
with:
vs-prerelease: true
msbuild-architecture: x64
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
dotnet-quality: 'preview'
- name: Setup NuGet.exe for use with actions
uses: NuGet/setup-nuget@v2
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore Nuget packages
run: nuget restore Inventory.sln
- name: Build
run: msbuild Inventory.sln
-verbosity:normal
-property:Configuration=${{env.BuildConfiguration}}
- name: Run tests
run: dotnet test