This repository has been archived on 2022-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
LyokoCMD/.gitlab-ci.yml

21 lines
664 B
YAML

image: mcr.microsoft.com/dotnet/core/sdk:2.1
stages:
- test
- deploy
lyokocmd-tests:
stage: test
before_script:
- dotnet restore
script:
- dotnet test test/LyokoCMD.Sim.Tests
lyokocmd-deploy:
stage: deploy
only:
- master@Lucidiot/LyokoCMD
script:
- dotnet pack --version-suffix latest
- find . -type f -name '*.nupkg' -not -path '*/.git/*' | sed -r 's/^.*\/([^\/]+)\.nupkg$/\1/;s/^([^0-9]+)\.([0-9.]+(-[a-zA-Z0-9]+)?)$/\1 \2/' | xargs -n2 dotnet nuget delete --non-interactive -k $NUGET_API_KEY || /bin/true
- find . -type f -name '*.nupkg' -not -path '*/.git/*' | xargs -n1 -I '{}' dotnet nuget push {} -k $NUGET_API_KEY