From 87f1aa0fdde70ab36eb1405ab779081ef344d0e9 Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Fri, 1 Mar 2024 14:59:29 -0600 Subject: [PATCH] Add logic to prevent running the ConvertToOffice sample on Mac - The Office conversion API is not implemented on Mac platforms, so let's add some logic to prevent building and running the ConvertToOffice sample on Mac. --- .github/workflows/test-dotnet-samples.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-dotnet-samples.yml b/.github/workflows/test-dotnet-samples.yml index 82219a4..d5318dd 100644 --- a/.github/workflows/test-dotnet-samples.yml +++ b/.github/workflows/test-dotnet-samples.yml @@ -71,7 +71,14 @@ jobs: dotnet-version: ${{ env.DOTNET_VERSION }} - name: Build samples working-directory: ${{ matrix.dir }} - run: dotnet build -c Release *.csproj + run: | + dll_name=$(basename "$PWD") + + if [ "$dll_name" != "ConvertToOffice" ] || [ "${{ matrix.os }}" != 'macos-14' ]; then + dotnet build -c Release *.csproj + else + echo "Not available on this os" + fi - name: List files run: | ls ${{matrix.dir}} @@ -79,4 +86,9 @@ jobs: working-directory: ${{matrix.dir}} run: | dll_name=$(basename "$PWD") - dotnet bin/Release/net6.0/$dll_name.dll + + if [ "$dll_name" != "ConvertToOffice" ] || [ "${{ matrix.os }}" != 'macos-14' ]; then + dotnet bin/Release/net6.0/$dll_name.dll + else + echo "Not available on this os" + fi