-
Notifications
You must be signed in to change notification settings - Fork 16
/
config.yml
46 lines (45 loc) · 1.21 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
version: 2
jobs:
build:
working_directory: /app
docker:
- image: stephenlautier/netcore-docker-ci:3.1.3
environment:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1"
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
steps:
- run:
name: Print environment versions
command: |
NPM_V=$(npm -v)
echo npm version':' $NPM_V
DOTNET_CLI_V=$(dotnet --version)
echo dotnet cli version':' $DOTNET_CLI_V
- checkout
- run:
name: dotnet restore
command: dotnet restore
- run:
name: dotnet build
command: dotnet build -c Release
- run:
name: test
command: npm test
- run:
name: Check if branch is publishable
command: |
if ! ([ $CIRCLE_BRANCH = "master" ] || [[ "$CIRCLE_BRANCH" =~ ^(([0-9]+|\.)+x)$ ]]); then
echo "Non-publishable branch; finishing build..."
circleci step halt
fi
- deploy:
name: Publish NuGet
command: |
export SKETCH7_NUGET_API_KEY=$API_KEY
npm run publish:dev
workflows:
version: 2
build:
jobs:
- build:
context: nuget