From c4da3ab4cb23a5910d60ce662fd140b5bd658626 Mon Sep 17 00:00:00 2001 From: Joseph Ortiz Date: Thu, 23 Oct 2025 20:34:13 -0700 Subject: [PATCH 1/3] Add github action file --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d475424 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Build and Test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build-and-test: + runs-on: windows-latest + name: Build and Test (Windows) + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup .NET 10 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '10.x' + + - name: Install .NET MAUI workload + run: dotnet workload install maui + + - name: Restore dependencies + run: dotnet restore CalendarMaker-MAUI/CalendarMaker-MAUI.csproj + + - name: Build + run: dotnet build CalendarMaker-MAUI/CalendarMaker-MAUI.csproj -c Release -f net10.0-windows10.0.19041.0 --no-restore + + - name: Run dotnet format + run: dotnet format CalendarMaker-MAUI/CalendarMaker-MAUI.csproj --verify-no-changes --verbosity diagnostic + continue-on-error: true + + - name: Run tests + run: dotnet test CalendarMaker-MAUI/CalendarMaker-MAUI.csproj -c Release -f net10.0-windows10.0.19041.0 --no-build --verbosity normal + + # - name: Upload build artifacts + # uses: actions/upload-artifact@v4 + # if: success() + # with: + # name: windows-build + # path: CalendarMaker-MAUI/bin/Release/net10.0-windows10.0.19041.0/ + # retention-days: 7 From f492e856516dd0ee6ac0e1105851cacb26f689b2 Mon Sep 17 00:00:00 2001 From: Joseph Ortiz Date: Thu, 23 Oct 2025 20:42:23 -0700 Subject: [PATCH 2/3] Add specific .NET version in restore step --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d475424..ec05be7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: run: dotnet workload install maui - name: Restore dependencies - run: dotnet restore CalendarMaker-MAUI/CalendarMaker-MAUI.csproj + run: dotnet restore CalendarMaker-MAUI/CalendarMaker-MAUI.csproj -f net10.0-windows10.0.19041.0 - name: Build run: dotnet build CalendarMaker-MAUI/CalendarMaker-MAUI.csproj -c Release -f net10.0-windows10.0.19041.0 --no-restore From 6d694307a383c7e5bc1828d145cc432847acf505 Mon Sep 17 00:00:00 2001 From: Joseph Ortiz Date: Thu, 23 Oct 2025 20:47:56 -0700 Subject: [PATCH 3/3] Simply action file --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec05be7..7f75d2b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,17 +25,17 @@ jobs: run: dotnet workload install maui - name: Restore dependencies - run: dotnet restore CalendarMaker-MAUI/CalendarMaker-MAUI.csproj -f net10.0-windows10.0.19041.0 + run: dotnet restore - name: Build - run: dotnet build CalendarMaker-MAUI/CalendarMaker-MAUI.csproj -c Release -f net10.0-windows10.0.19041.0 --no-restore + run: dotnet build -c Release --no-restore - name: Run dotnet format run: dotnet format CalendarMaker-MAUI/CalendarMaker-MAUI.csproj --verify-no-changes --verbosity diagnostic continue-on-error: true - name: Run tests - run: dotnet test CalendarMaker-MAUI/CalendarMaker-MAUI.csproj -c Release -f net10.0-windows10.0.19041.0 --no-build --verbosity normal + run: dotnet test -c Release --no-build --verbosity normal # - name: Upload build artifacts # uses: actions/upload-artifact@v4