-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
70 lines (69 loc) · 2.32 KB
/
appveyor.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
version: '1.0.{build}'
image: Visual Studio 2017
branches:
only:
- master
- develop
environment:
CODECOV_APIKEY:
secure: kwGF/Xd38DP8DGLzBOvX1xaSa+hUeCGV9prpnw79L3wtC4i9ivfGkhvKfANTUWiq
NUGETPACKAGE_VERSIONSUFFIX:
dotnet_csproj:
patch: true
file: '**\Krypt.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
cache:
#- '%USERPROFILE%\.nuget\packages'
init:
# Good practise, because Windows line endings are different from Unix/Linux ones
- git config --global core.autocrlf true
- ps: IF ($env:APPVEYOR_REPO_BRANCH -eq "master") {$env:NUGETPACKAGE_VERSIONSUFFIX = ""} else {$env:NUGETPACKAGE_VERSIONSUFFIX = "--version-suffix beta"}
- ps: Write-Host $env:NUGETPACKAGE_VERSIONSUFFIX
# set clone depth
clone_depth: 5
install:
# Install repo specific stuff here
before_build:
# Display .NET Core version
- dotnet --version
# Display minimal restore text
- dotnet restore ./src/Krypt.sln --verbosity m
build_script:
- dotnet pack ./src/Krypt/Krypt.csproj --include-source --include-symbols --configuration Release %NUGETPACKAGE_VERSIONSUFFIX%
test_script:
# restore packages for our unit tests
# run the unit tests (requires changing into the test directory) Require coverlet for coverage calculation
- dotnet test ./src/Krypt.Test/Krypt.Test.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
after_test:
- ps: >-
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
bash codecov.sh -f "./src/Krypt.Test/coverage.xml" -t %CODECOV_APIKEY%
deploy:
- provider: NuGet #support regular commit to master
name: production
on:
branch: master
api_key:
secure: Md9Vp7ciqXOXdcslNVOamwENnV+yvnfUUo72fq34WfnTeUND4WuLLdhMH68PLjP4
skip_symbols: false
artifact: /.*\.nupkg/
- provider: NuGet #support tags
name: testing
on:
branch: develop
api_key:
secure: Md9Vp7ciqXOXdcslNVOamwENnV+yvnfUUo72fq34WfnTeUND4WuLLdhMH68PLjP4
skip_symbols: false
artifact: /.*\.nupkg/
artifacts:
- path: '**\*.nupkg' # find all NuGet packages recursively'
name: krypt
type: NuGetPackage
after_build:
# For once the build has completed
on_finish :
# any cleanup in here