From 9a4fb30d07b697c100febecdd082336fe9ec87f5 Mon Sep 17 00:00:00 2001 From: trent Date: Thu, 1 Jan 2026 21:52:41 +0100 Subject: [PATCH] Add .woodpecker.yml --- .woodpecker.yml | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..5e3e097 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,50 @@ +steps: + restore: + image: mcr.microsoft.com/dotnet/sdk:8.0 + commands: + - dotnet restore --no-cache --force + + build: + image: mcr.microsoft.com/dotnet/sdk:8.0 + commands: + - dotnet build --no-restore -c Release + depends_on: + - restore + + test: + image: mcr.microsoft.com/dotnet/sdk:8.0 + commands: + - dotnet test --no-build -c Release --logger "trx" --results-directory ./test-results + depends_on: + - build + + pack-nuget: + image: mcr.microsoft.com/dotnet/sdk:8.0 + commands: + - | + for proj in $(find . -name "*DataModel.csproj"); do + echo "Packaging $proj" + dotnet pack "$proj" --no-build -c Release -o ./nuget-packages + done + when: + branch: ${CI_REPO_DEFAULT_BRANCH} + event: push + path: + include: + - "**/*DataModel.csproj" + + publish-api: + image: mcr.microsoft.com/dotnet/sdk:8.0 + commands: + - | + for proj in $(find . -name "*API.csproj"); do + proj_name=$(basename "$proj" .csproj) + echo "Publishing $proj" + dotnet publish "$$ proj" --no-build -c Release -o ./publish/ $${proj_name} + done + when: + branch: ${CI_REPO_DEFAULT_BRANCH} + event: push + path: + include: + - "**/*API.csproj" \ No newline at end of file