Files
nadekobot/.gitlab-ci.yml

38 lines
720 B
YAML

image: mcr.microsoft.com/dotnet/sdk:5.0
stages:
- build
- test
- publish
variables:
project: "NadekoBot"
tests: "NadekoBot.Tests"
before_script:
- "dotnet restore"
build:
stage: build
variables:
build_path: "src/$project"
script:
- "cd $build_path"
- "dotnet build -c Release"
publish:
stage: publish
variables:
build_path: "src"
script:
- "cd $build_path"
- "dotnet publish -c Release -r win7-x64 -o output-windows-x64 src/NadekoBot/NadekoBot.csproj"
- "dotnet publish -c Release -r linux-x64 -o output-linux-x64 src/NadekoBot/NadekoBot.csproj"
test:
stage: test
variables:
tests_path: "src/$tests"
script:
- "cd $tests_path"
- "dotnet test"