build maui in ci

This commit is contained in:
Andy Pack 2023-01-27 23:22:29 +00:00
parent b895a21fbd
commit 739c33c7d4
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7
4 changed files with 33 additions and 3 deletions

View File

@ -24,6 +24,26 @@ jobs:
- name: Test
run: dotnet test --no-restore --verbosity normal Selector.Core.sln
build-MAUI:
runs-on: windows-latest
needs: [build] # for ignoring bad builds
strategy:
fail-fast: false
matrix:
dotnet-version: [ '7.0.x' ]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install Dependencies
run: dotnet restore Selector.sln
- name: Build
run: dotnet build --configuration Debug --no-restore Selector.sln
build-Docker:
runs-on: ubuntu-latest

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFrameworks>net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
@ -38,6 +38,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-ios|AnyCPU'">
<CreatePackage>false</CreatePackage>
<MtouchLink>None</MtouchLink>
</PropertyGroup>
<!-- <PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst' and '$(Configuration)' == 'Debug'">
<CodeSignEntitlements>Platforms/MacCatalyst/Entitlements.Debug.plist</CodeSignEntitlements>
@ -49,6 +50,13 @@
<EnableCodeSigning>True</EnableCodeSigning>
<CodesignEntitlements>Platforms/MacCatalyst/Entitlements.Debug.plist</CodesignEntitlements>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-maccatalyst|AnyCPU'">
<CreatePackage>false</CreatePackage>
<CodesignKey>Mac Developer</CodesignKey>
<PackageSigningKey>3rd Party Mac Developer Installer</PackageSigningKey>
<EnableCodeSigning>True</EnableCodeSigning>
<MtouchLink>None</MtouchLink>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.png" Color="#2b2b2b" />
@ -71,6 +79,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<!-- <PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.2" /> -->
<PackageReference Include="Microsoft.AspNetCore.Components.Forms" Version="7.0.2" />
<PackageReference Include="Radzen.Blazor" Version="4.6.3" />
</ItemGroup>
<ItemGroup>
@ -83,6 +92,7 @@
<None Remove="Models\" />
<None Remove="Microsoft.AspNetCore.SignalR.Client" />
<None Remove="Microsoft.AspNetCore.Components.Forms" />
<None Remove="Radzen.Blazor" />
</ItemGroup>
<ItemGroup>
<Folder Include="Services\" />

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>net7.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>net7.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<EnableDefaultCompileItems>true</EnableDefaultCompileItems>
<LangVersion>latest</LangVersion>
</PropertyGroup>