-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (70 loc) · 1.9 KB
/
build.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
76
77
78
79
80
81
name: WinUI3Utilities Build Pipeline
on:
push:
branches-ignore:
- 'dependabot**'
tags-ignore:
- '**'
pull_request:
paths-ignore:
- '**.md'
- '.builds/**'
- '.specs/**'
schedule:
- cron: '0 0 * * *'
defaults:
run:
shell: pwsh
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
configuration: [Release]
platform: ['x64','x86','arm64']
env:
SOLUTION_NAME: 'WinUI3Utilities.sln'
PACKAGE_PROJECT_NAME: 'WinUI3Utilities.Samples/WinUI3Utilities.Samples.csproj'
PROJECT_RESTORE_PLATFORM: "x64"
CONFIGURATION: ${{ matrix.configuration }}
PLATFORM: ${{ matrix.platform }}
DEFAULT_DIR: ${{ github.workspace }} # Default: D:\a\WinUI3Utilities.Samples\WinUI3Utilities.Samples\
APPX_PACKAGE_DIR: ${{ github.workspace }}\AppxPackages
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup MSBuild
id: setup_msbuild
uses: microsoft/setup-msbuild@v1
- name: Setup NuGet
id: setup-nuget
uses: NuGet/[email protected]
- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Restore Files
id: restore_project
shell: pwsh
run: |
msbuild $env:SOLUTION_NAME `
-t:Restore `
-p:Platform=$env:PROJECT_RESTORE_PLATFORM `
-p:Configuration=$env:CONFIGURATION `
-p:PublishReadyToRun=true `
- name: Restore NuGet
id: restore_nuget
shell: pwsh
run: 'nuget restore $env:SOLUTION_NAME'
- name: Build Files (Release)
id: build_app_with_release
shell: pwsh
run: |
msbuild $env:PACKAGE_PROJECT_NAME `
-t:Build `
-p:Platform=$env:PLATFORM `
-p:Configuration=$env:CONFIGURATION `
-p:AppxBundle=Never `