Skip to content

RegistryEditor CI Validation #18

RegistryEditor CI Validation

RegistryEditor CI Validation #18

Workflow file for this run

# Copyright (c) 2024 0x5BFA
# Licensed under the MIT License.
name: RegistryEditor CI
on:
push:
branches:
- main
paths-ignore:
- 'builds/**'
- 'docs/**'
- '*.md'
pull_request:
paths-ignore:
- 'builds/**'
- 'docs/**'
- '*.md'
run-name: ${{ github.event_name == 'pull_request' && 'RegistryEditor PR Validation' || 'RegistryEditor CI Validation' }}
env:
WORKING_DIR: '${{ github.workspace }}' # 'D:\a\RegistryEditor\RegistryEditor'
SOLUTION_PATH: '${{ github.workspace }}\RegistryEditor.slnx'
WAPPROJ_PATH: '${{ github.workspace }}\RegistryEditor.WinUI.Packaging\RegistryEditor.WinUI.Packaging.wapproj'
APPX_PACKAGE_DIR: '${{ github.workspace }}\RegistryEditor.WinUI.Packaging\AppPackages'
jobs:
build:
if: github.repository_owner == '0x5bfa'
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
configuration: [Debug, Release]
platform: [x64, ARM64]
env:
CONFIGURATION: ${{ matrix.configuration }}
PLATFORM: ${{ matrix.platform }}
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet
uses: NuGet/setup-nuget@v2
- name: Setup .NET
uses: actions/setup-dotnet@v4
- name: Restore the solution
run: msbuild /restore $env:SOLUTION_PATH
- name: Build the solution
run: msbuild $env:WAPPROJ_PATH `
/p:Configuration=$env:CONFIGURATION `
/p:Platform=$env:PLATFORM `
/p:UapAppxPackageBuildMode=StoreUpload
- if: env.CONFIGURATION == 'Release' && env.PLATFORM == 'x64'
name: Upload the packages to the Artifacts
uses: actions/upload-artifact@v4
with:
name: 'Appx Packages (${{ env.CONFIGURATION }},${{ env.PLATFORM }})'
path: ${{ env.APPX_PACKAGE_DIR }}