From d7b692403d232d50177e6970e15ce7d7f3ea2778 Mon Sep 17 00:00:00 2001 From: Ali Date: Thu, 26 Dec 2024 14:03:29 +0330 Subject: [PATCH] Update Build.yml --- .github/workflows/Build.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 803c21d..0aa7a49 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -23,18 +23,22 @@ jobs: with: dotnet-version: '8.0.x' # .NET version - - name: Install dependencies + - name: Install MAUI workloads run: | - dotnet restore # Restore project dependencies - + dotnet workload install maui + dotnet workload install maui-android maui-ios maui-maccatalyst maui-windows + + - name: Restore dependencies + run: dotnet restore + - name: Build project run: | - dotnet build --configuration Release --target ${{ matrix.platform }} --no-restore # Build project for target platform + dotnet build --configuration Release --framework ${{ matrix.platform }} --no-restore - name: Publish for ${{ matrix.platform }} run: | - dotnet publish --configuration Release --output ./publish --target ${{ matrix.platform }} --no-restore # Publish the app for the selected platform - + dotnet publish --configuration Release --framework ${{ matrix.platform }} --output ./publish --no-restore + - name: Archive artifacts if: success() # Archive the build artifacts uses: actions/upload-artifact@v3