diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..e637cb2 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "cake.tool": { + "version": "4.2.0", + "commands": [ + "dotnet-cake" + ] + } + } +} + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..099913b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: CI + +on: + push: + branches: ["main"] + pull_request: + +jobs: + build: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup .NET 6 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: "6.0.x" + + - name: Build (Release via Cake) + run: pwsh -NoProfile -ExecutionPolicy Bypass -File ./build.ps1 -Target Build diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c0ff703 --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +# Build outputs +**/bin/ +**/obj/ + +# Visual Studio / Rider +.vs/ +.vscode/ +.idea/ +*.user +*.suo +*.userosscache +*.sln.docstates + +# NuGet +*.nupkg +*.snupkg +packages/ + +# OS / tooling noise +Thumbs.db +Desktop.ini + diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..e6fb422 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,10 @@ +param( + [Parameter(Mandatory = $false)] + [string]$Target = "Build" +) + +$ErrorActionPreference = "Stop" + +dotnet tool restore | Out-Host +dotnet tool run dotnet-cake -- build.cake --target=$Target | Out-Host + diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..715d2a0 --- /dev/null +++ b/build.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail + +TARGET="${1:-Build}" + +dotnet tool restore +dotnet tool run dotnet-cake -- build.cake --target="$TARGET" +