-
Notifications
You must be signed in to change notification settings - Fork 260
49 lines (45 loc) · 1.36 KB
/
dotnet.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
name: Build WPF Designer
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
Configuration: [ Debug, Release ]
env:
BuildPlatform: 'Any CPU'
BuildVersion: '8.1.${{ github.run_number }}'
steps:
- uses: actions/checkout@v4
- name: Update project version
uses: roryprimrose/set-vs-sdk-project-version@v1
with:
projectFilter: '**/*.csproj'
version: ${{ env.BuildVersion }}
assemblyVersion: ${{ env.BuildVersion }}
fileVersion: ${{ env.BuildVersion }}
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Setup NuGet.exe
uses: nuget/setup-nuget@v2
- run: nuget restore WpfDesign.sln
- name: Build
run: dotnet build WpfDesign.sln --no-restore -c ${{ matrix.configuration }}
- name: Test
run: dotnet test WpfDesign.sln --no-build --verbosity normal -c ${{ matrix.configuration }}
- name: Pack
if: matrix.configuration == 'release'
run: .\nuget\pack.ps1
- name: Upload NuGet
if: matrix.configuration == 'release'
uses: actions/upload-artifact@v4
with:
name: NuGet Packages (${{ matrix.configuration }})
path: '**/*.nupkg'
if-no-files-found: error