-
Notifications
You must be signed in to change notification settings - Fork 3.5k
74 lines (62 loc) · 2.17 KB
/
build_artifacts.yml
File metadata and controls
74 lines (62 loc) · 2.17 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Build Artifacts
on:
workflow_call:
inputs:
build-configuration:
default: "Release"
required: false
type: string
mdix-version:
required: true
type: string
mdix-colors-version:
required: true
type: string
mdix-mahapps-version:
required: true
type: string
jobs:
build:
name: Build and Test
runs-on: windows-latest
env:
solution: MaterialDesignToolkit.Full.slnx
steps:
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.x
9.x
10.x
- name: Restore dependencies
run: dotnet restore ${{ env.solution }}
- name: Build
run: dotnet build ${{ env.solution }} --configuration ${{ inputs.build-configuration }} --no-restore -p:Platform="Any CPU" -p:TreatWarningsAsErrors=True
env:
MDIXVersion: ${{ inputs.mdix-version }}
MDIXColorsVersion: ${{ inputs.mdix-colors-version }}
MDIXMahAppsVersion: ${{ inputs.mdix-mahapps-version }}
- name: Test
timeout-minutes: 20
run: dotnet test ${{ env.solution }} --configuration ${{ inputs.build-configuration }} --no-build --blame-crash --logger GitHubActions
- name: Upload Screenshots
if: ${{ always() }}
uses: actions/upload-artifact@v7
with:
name: Screenshots-${{ github.run_number }}
path: ${{ github.workspace }}\tests\MaterialDesignThemes.UITests\bin\${{ inputs.build-configuration }}\net9.0-windows\Screenshots
if-no-files-found: ignore
- name: Build NuGets
run: .\build\BuildNugets.ps1 -MDIXVersion ${{ inputs.mdix-version }} -MDIXColorsVersion ${{ inputs.mdix-colors-version }} -MDIXMahAppsVersion ${{ inputs.mdix-mahapps-version }}
- name: Upload NuGets
uses: actions/upload-artifact@v7
with:
name: NuGets
path: "*.nupkg"
- name: Upload Demo App
uses: actions/upload-artifact@v7
with:
name: DemoApp
path: "src/MainDemo.Wpf/bin/${{ env.buildConfiguration }}"