From 5f25e37f7f88810645923f3664b2e72393d5c16c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Zi=C4=85bek?= Date: Tue, 13 Dec 2022 12:03:37 +0100 Subject: [PATCH] Test build script --- .github/workflows/dotnet-desktop.yml | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/dotnet-desktop.yml diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml new file mode 100644 index 0000000..1ed86dd --- /dev/null +++ b/.github/workflows/dotnet-desktop.yml @@ -0,0 +1,42 @@ +name: Run Build and Unit tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + schedule: + - cron: '3 0 * * 0' + +jobs: + main: + runs-on: ${{ matrix.environment }} + strategy: + matrix: + environment: + - macos-latest + - ubuntu-latest + - windows-latest + env: + DOTNET_NOLOGO: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages + UNIT_TEST_PROJECT: QuestPDF.UnitTests/QuestPDF.UnitTests.csproj + + steps: + - name: 📝 Fetch Sources 📝 + uses: actions/checkout@v2 + + - name: ⚙ Setup .NET 6.0 SDK ⚙ + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' + + - name: 🔄 Restore Nuget Packages 🔄 + shell: bash + run: dotnet restore + + - name: 🛠 Build Solution 🛠 + shell: bash + run: dotnet build -c Release --no-restore