forked from skbkontur/gremit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
58 lines (48 loc) · 1.54 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 2017
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 matches 'vX.Y-release'
{
$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 ./GrEmit.sln --verbosity m
build_script:
- cmd: dotnet build --configuration Release ./GrEmit.sln
- cmd: dotnet pack --no-build --configuration Release ./GrEmit.sln
test_script:
- cmd: dotnet test --no-build --configuration Release ./GrEmit.Tests/GrEmit.Tests.csproj
artifacts:
- path: './GrEmit/bin/Release/*.nupkg'
deploy:
- provider: NuGet
server: https://nuget.org
api_key:
secure: dzTnT0xSlPrHnrG06cj354nTN4lXWhfh4ZCJ1910I3VnNdvbx0rQFLTyJ5l1+bgB
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