-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub actions to build and package.
- Loading branch information
1 parent
b46eced
commit 1afc244
Showing
14 changed files
with
325 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# This workflow will build, test, sign and package a WPF or Windows Forms desktop application | ||
# built on .NET Core. | ||
# To learn how to migrate your existing application to .NET Core, | ||
# refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework | ||
# | ||
# To configure this workflow: | ||
# | ||
# 1. Configure environment variables | ||
# GitHub sets default environment variables for every workflow run. | ||
# Replace the variables relative to your project in the "env" section below. | ||
# | ||
# 2. Signing | ||
# Generate a signing certificate in the Windows Application | ||
# Packaging Project or add an existing signing certificate to the project. | ||
# Next, use PowerShell to encode the .pfx file using Base64 encoding | ||
# by running the following Powershell script to generate the output string: | ||
# | ||
# $pfx_cert = Get-Content '.\SigningCertificate.pfx' -Encoding Byte | ||
# [System.Convert]::ToBase64String($pfx_cert) | Out-File 'SigningCertificate_Encoded.txt' | ||
# | ||
# Open the output file, SigningCertificate_Encoded.txt, and copy the | ||
# string inside. Then, add the string to the repo as a GitHub secret | ||
# and name it "Base64_Encoded_Pfx." | ||
# For more information on how to configure your signing certificate for | ||
# this workflow, refer to https://github.com/microsoft/github-actions-for-desktop-apps#signing | ||
# | ||
# Finally, add the signing certificate password to the repo as a secret and name it "Pfx_Key". | ||
# See "Build the Windows Application Packaging project" below to see how the secret is used. | ||
# | ||
# For more information on GitHub Actions, refer to https://github.com/features/actions | ||
# For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications, | ||
# refer to https://github.com/microsoft/github-actions-for-desktop-apps | ||
|
||
name: .NET Core Desktop | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
# strategy: | ||
# matrix: | ||
# configuration: [Debug, Release] | ||
|
||
runs-on: windows-latest # For a list of available runner types, refer to | ||
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | ||
|
||
env: | ||
Solution_Name: src\FlaUI.WebDriver.sln | ||
Test_Project_Path: src\FlaUI.WebDriver.UITests\FlaUI.WebDriver.UITests.csproj | ||
Wap_Project_Directory: src\FlaUI.WebDriver.Package | ||
Wap_Project_Path: src\FlaUI.WebDriver.Package\FlaUI.WebDriver.Package.wapproj | ||
Configuration: Release | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
- name: Setup MSBuild.exe | ||
uses: microsoft/setup-msbuild@v2 | ||
|
||
- name: Restore dependencies | ||
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration /V:minimal | ||
|
||
- name: Test | ||
run: dotnet test --no-restore --verbosity normal | ||
working-directory: ./src | ||
|
||
- name: Create the app package | ||
run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:RestorePackages=false | ||
env: | ||
Appx_Bundle: Always | ||
Appx_Bundle_Platforms: x86|x64 | ||
Appx_Package_Build_Mode: StoreUpload | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: MSIX Package | ||
path: ${{ env.Wap_Project_Directory }}\AppPackages |
82 changes: 82 additions & 0 deletions
82
src/FlaUI.WebDriver.Package/FlaUI.WebDriver.Package.wapproj
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '15.0'"> | ||
<VisualStudioVersion>15.0</VisualStudioVersion> | ||
</PropertyGroup> | ||
<ItemGroup Label="ProjectConfigurations"> | ||
<ProjectConfiguration Include="Debug|x86"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>x86</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|x86"> | ||
<Configuration>Release</Configuration> | ||
<Platform>x86</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Debug|x64"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|x64"> | ||
<Configuration>Release</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Debug|ARM"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>ARM</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|ARM"> | ||
<Configuration>Release</Configuration> | ||
<Platform>ARM</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Debug|ARM64"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>ARM64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|ARM64"> | ||
<Configuration>Release</Configuration> | ||
<Platform>ARM64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Debug|AnyCPU"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>AnyCPU</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|AnyCPU"> | ||
<Configuration>Release</Configuration> | ||
<Platform>AnyCPU</Platform> | ||
</ProjectConfiguration> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath> | ||
</PropertyGroup> | ||
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" /> | ||
<PropertyGroup> | ||
<ProjectGuid>c6b51974-4552-4854-82fe-f48ae94a66e7</ProjectGuid> | ||
<TargetPlatformVersion>10.0.22621.0</TargetPlatformVersion> | ||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion> | ||
<DefaultLanguage>en-US</DefaultLanguage> | ||
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled> | ||
<NoWarn>$(NoWarn);NU1702</NoWarn> | ||
<EntryPointProjectUniqueName>..\FlaUI.WebDriver\FlaUI.WebDriver.csproj</EntryPointProjectUniqueName> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<AppxManifest Include="Package.appxmanifest"> | ||
<SubType>Designer</SubType> | ||
</AppxManifest> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="Images\SplashScreen.scale-200.png" /> | ||
<Content Include="Images\LockScreenLogo.scale-200.png" /> | ||
<Content Include="Images\Square150x150Logo.scale-200.png" /> | ||
<Content Include="Images\Square44x44Logo.scale-200.png" /> | ||
<Content Include="Images\Square44x44Logo.targetsize-24_altform-unplated.png" /> | ||
<Content Include="Images\StoreLogo.png" /> | ||
<Content Include="Images\Wide310x150Logo.scale-200.png" /> | ||
</ItemGroup> | ||
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" /> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" PrivateAssets="all" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\FlaUI.WebDriver\FlaUI.WebDriver.csproj" /> | ||
</ItemGroup> | ||
</Project> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.23 KB
...aUI.WebDriver.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<Package | ||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" | ||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" | ||
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" | ||
IgnorableNamespaces="uap rescap"> | ||
|
||
<Identity | ||
Name="bf167e81-3057-4dd1-a7f0-e410a39e2a07" | ||
Publisher="CN=aristotelos" | ||
Version="1.0.0.0" /> | ||
|
||
<Properties> | ||
<DisplayName>FlaUI.WebDriver.Package</DisplayName> | ||
<PublisherDisplayName>aristotelos</PublisherDisplayName> | ||
<Logo>Images\StoreLogo.png</Logo> | ||
</Properties> | ||
|
||
<Dependencies> | ||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" /> | ||
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.14393.0" /> | ||
</Dependencies> | ||
|
||
<Resources> | ||
<Resource Language="x-generate"/> | ||
</Resources> | ||
|
||
<Applications> | ||
<Application Id="App" | ||
Executable="$targetnametoken$.exe" | ||
EntryPoint="$targetentrypoint$"> | ||
<uap:VisualElements | ||
DisplayName="FlaUI.WebDriver.Package" | ||
Description="FlaUI.WebDriver.Package" | ||
BackgroundColor="transparent" | ||
Square150x150Logo="Images\Square150x150Logo.png" | ||
Square44x44Logo="Images\Square44x44Logo.png"> | ||
<uap:DefaultTile Wide310x150Logo="Images\Wide310x150Logo.png" /> | ||
<uap:SplashScreen Image="Images\SplashScreen.png" /> | ||
</uap:VisualElements> | ||
</Application> | ||
</Applications> | ||
|
||
<Capabilities> | ||
<rescap:Capability Name="runFullTrust" /> | ||
<Capability Name="privateNetworkClientServer"/> | ||
</Capabilities> | ||
</Package> |
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
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
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
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