Repository navigation
52 lines (43 loc) · 1.62 KB
/
Copy pathbuild.yml
File metadata and controls
52 lines (43 loc) · 1.62 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
name: build
on:
push:
branches: [master]
pull_request:
jobs:
build:
# WPF on .NET Framework 4.8: needs Visual Studio MSBuild, `dotnet build` cannot compile the legacy WPF csproj.
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
- uses: nuget/setup-nuget@v2
- uses: darenm/Setup-VSTest@v1.3
- name: Restore
# nuget.exe restores both packages.config (WPF host) and PackageReference (Core, tests).
run: nuget restore src/LogViewer.sln
- name: Build
run: msbuild src/LogViewer.sln -p:Configuration=Release -p:TreatWarningsAsErrors=true -m -nologo -v:m
- name: Test
run: >
vstest.console.exe
src/LogViewer.Core.Tests/bin/Release/net48/LogViewer.Core.Tests.dll
src/LogViewer.App.Tests/bin/Release/net48/LogViewer.App.Tests.dll
/logger:trx /ResultsDirectory:TestResults
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: TestResults/
- name: Stage app
# Same packaging as release.yml (build/stage.ps1): the whole output folder including en/,
# without symbols and library XML docs. The artifact is named after the built version.
shell: pwsh
run: |
$version = ./build/stage.ps1 -Output publish/LogViewer
"APP_VERSION=$version" >> $env:GITHUB_ENV
- name: Upload app
uses: actions/upload-artifact@v4
with:
name: LogViewer-${{ env.APP_VERSION }}
path: publish/LogViewer/