Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
stages:
- build
- test
- push

variables:
PROJECT_NAME: "TupleExtensions"
BUILD_CONFIGURATION: "Release"
DOCKER_DRIVER: overlay
NUGET_SOURCE: "https://www.nuget.org/api/v2/package"

build release:
image: microsoft/dotnet:2.0-sdk
stage: build
tags:
- docker
script:
- dotnet restore
- dotnet build -c $BUILD_CONFIGURATION ./src/TupleExtensions/TupleExtensions.csproj
artifacts:
expire_in: 1 day
paths:
- 'src/TupleExtensions/bin/$BUILD_CONFIGURATION/*.nupkg'
only:
- master

build prerelease:
image: microsoft/dotnet:2.0-sdk
stage: build
tags:
- docker
script:
- dotnet restore
- dotnet build -c $BUILD_CONFIGURATION ./src/TupleExtensions/TupleExtensions.csproj --version-suffix alpha
artifacts:
expire_in: 1 day
paths:
- 'src/$PROJECT_NAME/bin/$BUILD_CONFIGURATION/*.nupkg'
except:
- master

test:
image: microsoft/dotnet:1.1-sdk
stage: test
tags:
- docker
script:
- dotnet restore
- dotnet test ./test/TupleExtensions.Tests/TupleExtensions.Tests.csproj

push to nuget:
stage: push
tags:
- docker
script:
- cd NuGet
- nuget setapikey $NUGET_API_KEY -Source $NUGET_SOURCE -Verbosity quiet
- nuget push *.nupkg -Source $NEXUS_SOURCE
only:
- master