Files
FA_WEB/.woodpecker.yml
2026-01-02 14:16:54 +01:00

65 lines
1.6 KiB
YAML

skip_clone: true
steps:
clone-manual:
image: woodpeckerci/plugin-git
settings:
remote: http://gitea:3000/FA/FA_WEB.git
branch: master
depth: 1
restore:
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- dotnet restore --no-cache --force
depends_on:
- clone-manual
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"
depends_on:
- test # opcjonalnie, dodaj jeśli chcesz zależności
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"
depends_on:
- test # opcjonalnie