Files
isn/.gitlab-ci.yml
2021-06-14 00:57:06 +01:00

62 lines
1.7 KiB
YAML

# This file is a template, and might need editing before it works on your project.
# see https://docs.gitlab.com/ee/ci/yaml/README.html for all available options
# you can delete this line if you're not using Docker
image: busybox:latest
before_script:
- echo "Before script section"
- echo "For example you might run an update here or install a build dependency"
- echo "Or perhaps you might print out some debugging details"
- dotnet restore
after_script:
- echo "After script section"
- echo "For example you might do some cleanup here"
build1:
stage: build
script:
- dotnet build
nonreg:
stage: test
script:
- |
cd test/nuget.host.tests
ASPNETCORE_ENVIRONMENT=Development dotnet test
test2:
stage: test
script:
- echo "Do another parallel test here"
- echo "For example run a lint test"
publish:
stage: deploy
artifacts:
paths:
- src/nuget-host/bin/Release/netcoreapp2.1/publish/
script:
- dotnet publish --version-suffix ci --configuration Release --ignore-failed-sources
deploy:
stage: deploy
script:
- dotnet pack -c Release
- dotnet nuget add source "$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/nuget/index.json" --name gitlab --username gitlab-ci-token --password $CI_JOB_TOKEN --store-password-in-clear-text || true
- dotnet nuget push "src/*/bin/Release/*.nupkg" --source gitlab
only:
- master
pack:
stage: deploy
artifacts:
paths:
- src/nuget-host/bin/Release/nuget-host.*.nupkg
script:
- dotnet pack --configuration Release --no-restore
- cd src/nuget-cli
- dotnet run push -s $NUGETSOURCE -k $NUGETSOURCEAPIKEY ../nuget-host/bin/Release/nuget-host.*.nupkg