37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
version: 2.1
|
|
jobs:
|
|
build-and-test:
|
|
docker:
|
|
- image: mcr.microsoft.com/dotnet/sdk:6.0
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Build Triangle.NET
|
|
command: dotnet build src/Triangle.sln -c Release -v m
|
|
- run:
|
|
name: Test Triangle.NET
|
|
command: dotnet test src/Triangle.sln --no-restore -c Release -v m
|
|
pack-and-publish:
|
|
docker:
|
|
- image: mcr.microsoft.com/dotnet/sdk:6.0
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Build SDK Projects
|
|
command: dotnet pack src/Triangle/Triangle/Triangle.csproj -c Release -p:Version=$CIRCLE_TAG
|
|
- run:
|
|
name: Push to nuget
|
|
command: dotnet nuget push "**/*.nupkg" -s https://api.nuget.org/v3/index.json -k $NUGET_APIKEY -n --skip-duplicate
|
|
# Invoke jobs via workflows
|
|
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
|
|
workflows:
|
|
deploy:
|
|
jobs:
|
|
- pack-and-publish:
|
|
filters:
|
|
branches:
|
|
ignore: /.*/
|
|
tags:
|
|
only: /([0-9]+)\.([0-9]+)\.([0-9]+)(?:-\w{1,10})?$/
|
|
context: nuget
|