forked from skbkontur/Metrics.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
58 lines (48 loc) · 1.65 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
version: '{build}'
skip_commits:
files:
- '**/*.md'
image: Visual Studio 2019
init:
- cmd: git config --global core.autocrlf false
- ps: |
$ErrorActionPreference = "Stop"
$tagName = $env:APPVEYOR_REPO_TAG_NAME
if ($tagName -match '^v\d+\.\d+') # tag name starts with 'vX.Y'
{
$env:SHOULD_PUBLISH_NUGET_PACKAGE = "true"
Write-Host "Will publish nuget package for $tagName tag" -ForegroundColor "Green"
if ($tagName -match '^v\d+\.\d+-release') # tag name starts with 'vX.Y-release' (e.g. use 'v4.2-release.1' tag for the first patch for release v4.2)
{
$env:SHOULD_CREATE_RELEASE = "true"
Write-Host "Will create release for $tagName tag" -ForegroundColor "Green"
}
}
nuget:
disable_publish_on_pr: true
before_build:
- cmd: dotnet --info
- cmd: dotnet restore ./Metrics.sln --verbosity minimal
build_script:
- cmd: dotnet build --configuration Release ./Metrics.sln
- cmd: dotnet pack --no-build --configuration Release ./Metrics.sln
test_script:
- cmd: dotnet test --no-build --verbosity normal --configuration Release ./Metrics.Tests/Metrics.Tests.csproj
artifacts:
- path: './Metrics/bin/Release/*.nupkg'
deploy:
- provider: NuGet
server: https://nuget.org
api_key:
secure: CQ4MGAZ56ySfApnQ2TeZhSYDs+yLTggiu+5EWVsJBF9xn/pKcOO9IelQM6qA0mbf
skip_symbols: true
on:
SHOULD_PUBLISH_NUGET_PACKAGE: true
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
auth_token:
secure: y8dDOcAtq4U1MTDJFX8f23xsvyFU1u4bhwr9Lzbkf2revNWPPTifBkWghris9v8i
draft: false
prerelease: false
on:
SHOULD_CREATE_RELEASE: true