-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_windows.yml
75 lines (59 loc) · 1.86 KB
/
build_windows.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: windowsCI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
env:
DOTNETVERSION: 8.0.100-rc.2.23502.2
VSVERSION: 2022/Preview
permissions:
checks: write
jobs:
buildMaui:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: Install .NET 8
shell: pwsh
run: |
curl -o dotnet-install.sh -sSL https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1
sh dotnet-install.sh --version ${{env.DOTNETVERSION}}
dotnet --list-sdks
- name: Setup .NET SDK ${{env.DOTNETVERSION}}
uses: actions/setup-dotnet@v1
with:
dotnet-version: '${{env.DOTNETVERSION}}'
- name: List installed .NET info
shell: pwsh
run: dotnet --info
- name: Install .NET MAUI
shell: pwsh
run: |
& dotnet nuget locals all --clear
& dotnet workload install maui android
- name: Run Unit Test
shell: bash
run: |
dotnet test <path_to_Test_Project> --logger trx --configuration Debug --collect:"XPlat Code Coverage"
- name: Test Reporter
uses: dorny/test-reporter@v1.7.0
if: success() || failure()
with:
name: Unit Test Report
path: '**/*.trx'
reporter: dotnet-trx
# https://docs.microsoft.com/en-us/dotnet/maui/windows/deployment/overview
- name: Build Windows App
run: |
dotnet publish <path_to_csproj> -f net8.0-windows10.0.19041.0 -c Release
- name : Build Android App
run: |
dotnet publish <path_to_csproj> -f net8.0-android -c Release
- uses: actions/upload-artifact@v2
with:
name: artifacts-windows
path: |
**\*.msix
**\*.apk