From 60eedd12bb79b5ac3abe88483ce167e85e9362ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Chalet?= Date: Mon, 1 Jul 2024 09:46:49 +0200 Subject: [PATCH] Update the build workflow to select the latest Xcode version and allow building macOS/Mac Catalyst/iOS packages on macOS --- .github/workflows/build.yml | 4 +++ Directory.Build.props | 34 ++++++++++--------- OpenIddict.sln | 3 +- eng/Build.props | 17 ++++++++++ .../OpenIddict.Sandbox.Maui.Client.csproj | 6 ++-- 5 files changed, 44 insertions(+), 20 deletions(-) create mode 100644 eng/Build.props diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 451c3501..5262f663 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,6 +41,10 @@ jobs: os_name: windows steps: + - name: Select Xcode version + if: ${{ runner.os == 'macOS' }} + run: sudo xcode-select -s "/Applications/Xcode_15.4.app" + - name: Checkout code uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 diff --git a/Directory.Build.props b/Directory.Build.props index 7b38938b..1edc44c9 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -38,39 +38,41 @@ built on machines that don't have the iOS workload installed, a directory check is used to ensure the iOS reference assemblies pack is present on the machine before targeting iOS. --> - true + ('$(MSBuildRuntimeType)' != 'Core' And Exists('$(ProgramFiles)\dotnet\packs\Microsoft.iOS.Ref'))) ">true - true + ('$(MSBuildRuntimeType)' != 'Core' And Exists('$(ProgramFiles)\dotnet\packs\Microsoft.MacCatalyst.Ref'))) ">true - true + ('$(MSBuildRuntimeType)' != 'Core' And Exists('$(ProgramFiles)\dotnet\packs\Microsoft.macOS.Ref'))) ">true - - true + true + + + + diff --git a/sandbox/OpenIddict.Sandbox.Maui.Client/OpenIddict.Sandbox.Maui.Client.csproj b/sandbox/OpenIddict.Sandbox.Maui.Client/OpenIddict.Sandbox.Maui.Client.csproj index 670ba498..e7b3d7b1 100644 --- a/sandbox/OpenIddict.Sandbox.Maui.Client/OpenIddict.Sandbox.Maui.Client.csproj +++ b/sandbox/OpenIddict.Sandbox.Maui.Client/OpenIddict.Sandbox.Maui.Client.csproj @@ -2,9 +2,9 @@ Exe - net8.0-windows10.0.19041 - $(TargetFrameworks);net8.0-ios17.2 - $(TargetFrameworks);net8.0-maccatalyst17.2 + net8.0-windows10.0.19041 + $(TargetFrameworks);net8.0-ios17.2 + $(TargetFrameworks);net8.0-maccatalyst17.2 true net8.0 true