-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
91 lines (78 loc) · 2.34 KB
/
build-app.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
82
83
84
85
86
87
88
89
90
91
name: Build Files
on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
env:
APPLICATION_NAME: 'Files'
SOLUTION_NAME: 'Files.sln'
PACKAGE_PROJECT_DIR: 'src\Files.App (Package)'
PACKAGE_PROJECT_PATH: 'src\Files.App (Package)\Files.Package.wapproj'
TEST_PROJECT_PATH: 'tests\Files.InteractionTests\Files.InteractionTests.csproj'
CONFIGURATION: ${{ matrix.configuration }}
PLATFORM: ${{ matrix.platform }}
APPX_BUNDLE_PLATFORMS: ${{ matrix.platform }}
WORKING_DIR: ${{ github.workspace }} # Default: D:\a\Files\Files\
ARTIFACTS_STAGING_DIR: ${{ github.workspace }}\artifacts
APPX_PACKAGE_DIR: ${{ github.workspace }}\artifacts\AppxPackages
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
configuration: [Debug]
platform: [x64, arm64]
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Setup .NET 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Restore NuGet
shell: pwsh
run: 'nuget restore $env:SOLUTION_NAME'
- name: Restore ${{ env.APPLICATION_NAME }}
shell: pwsh
run: |
msbuild $env:SOLUTION_NAME `
-t:Restore `
-p:Platform=$env:PLATFORM `
-p:Configuration=$env:CONFIGURATION `
-p:PublishReadyToRun=true
- name: Build & Publish ${{ env.APPLICATION_NAME }}
run: |
msbuild
-p:Configuration=$env:CONFIGURATION `
-p:Platform=$env:PLATFORM `
-p:AppxBundlePlatforms=$env:APPX_BUNDLE_PLATFORMS `
-p:AppxBundle=Always `
-p:UapAppxPackageBuildMode=SideloadOnly `
-p:AppxPackageDir=$env:APPX_PACKAGE_DIR `
-p:AppxPackageSigningEnabled=true
- name: Install package
shell: pwsh
run: |
cd "$env:APPX_PACKAGE_DIR"
$AppBundle = Get-ChildItem -Filter Files*Test -Name
echo $AppBundle
cd $AppBundle
ls
./Install.ps1 -Force
Get-AppxPackage
- name: Set full HD resolution
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force
- name: Execute UI tests
run: dotnet test