GitHub: Added build CI #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | ||
Check failure on line 21 in .github/workflows/build-app.yml GitHub Actions / Build FilesInvalid workflow file
|
||
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 |