File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ version : 2
2+ jobs :
3+ build :
4+ docker :
5+ - image : microsoft/dotnet
6+ steps :
7+ - checkout
8+ - run :
9+ name : restore
10+ command : dotnet restore
11+ - run :
12+ name : build
13+ command : dotnet build -c Release
14+ - deploy :
15+ name : Publish NuGet
16+ command : |
17+ if [ "$CIRCLE_BRANCH" != "release" ]; then
18+ echo -e "\e[33m Branch does not publish -- exit!"
19+ exit
20+ fi
21+ . ./.circleci/utils.sh
22+ if [ "$NUGET_API_KEY" == "" ]; then
23+ echo NUGET_API_KEY environment variable not defined.
24+ exit 1
25+ fi
26+ PACKAGE_VERSION=0.1.$CIRCLE_BUILD_NUM
27+ dotnet pack /p:PackageVersion=$PACKAGE_VERSION -o ../../ -c release --include-symbols
28+ dotnet nuget push *.nupkg -k $NUGET_API_KEY -s https://www.nuget.org/api/v2/package
29+ print_title "git tag"
30+ git tag $PACKAGE_VERSION
31+ git push --tags
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ print_title () {
3+ echo -e " \e[36m ---- $1 ---- \e[39m"
4+ }
You can’t perform that action at this time.
0 commit comments