Skip to content

Commit

Permalink
Migrate to WinUI 3 (#9)
Browse files Browse the repository at this point in the history
* WinUI3

* Update zebble

* Fix csproj

* Github action

---------

Co-authored-by: Reza Talebi <[email protected]>
  • Loading branch information
RezaT4795 and Reza Talebi authored Sep 23, 2024
1 parent 64720b6 commit 4041598
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 8 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publishes a new package of Zebble.Carousel to the nuget.org
on:
push:
branches: [ master ]
jobs:
build:
strategy:
matrix:
configuration: [ Release ]
runs-on: windows-2022
steps:
- uses: actions/checkout@v4

- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'

- name: Install MAUI
run: dotnet workload install ios android maui --source https://aka.ms/dotnet8/nuget/index.json --source https://api.nuget.org/v3/index.json

- name: Install Zebble's CLI tools
run: dotnet tool install --global zebble-build

- name: Publish a new Zebble.Carousel package
run: zebble-build update-plugin --api-key ${{secrets.NUGET_API_KEY}} --publish
17 changes: 9 additions & 8 deletions Carousel.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.44">
<PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);uap10.0.18362</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net8.0-windows10.0.19041</TargetFrameworks>
<AssemblyName>Zebble.Carousel</AssemblyName>
<RootNamespace>Zebble</RootNamespace>
<PackageId>Zebble.Carousel</PackageId>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
<Version>5.0.4.0</Version>
<Version>5.1.0.0</Version>
<PackOnBuild>true</PackOnBuild>
<NeutralLanguage>en</NeutralLanguage>
<DefineConstants>$(DefineConstants)</DefineConstants>
Expand All @@ -29,8 +29,9 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition=" $(TargetFramework.StartsWith('uap10.0')) ">
<DefineConstants>$(DefineConstants);UWP</DefineConstants>
<PropertyGroup Condition=" $(TargetFramework.Contains('windows')) ">
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<DefineConstants>$(DefineConstants);WINUI</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" $(TargetFramework.Contains('android')) ">
<DefineConstants>$(DefineConstants);ANDROID</DefineConstants>
Expand All @@ -42,8 +43,8 @@
<ItemGroup>
<Compile Include="Shared\**\*.cs" />
</ItemGroup>
<ItemGroup Condition=" $(DefineConstants.Contains('UWP')) ">
<Compile Include="UWP\**\*.cs" />
<ItemGroup Condition=" $(DefineConstants.Contains('WINUI')) ">
<Compile Include="WinUI\**\*.cs" />
</ItemGroup>
<ItemGroup Condition=" $(DefineConstants.Contains('ANDROID')) ">
<Compile Include="Android\**\*.cs" />
Expand All @@ -58,9 +59,9 @@
<None Remove="Zebble-LicenseAgreement.txt" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Zebble" Version="5.0.35" />
<PackageReference Include="Zebble" Version="5.1.2" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(Running)'=='local'">
<Exec Command="update-local-nuget-cache $(TargetDir)" />
</Target>
</Project>

0 comments on commit 4041598

Please sign in to comment.