forked from skbkontur/GrobExp.Mutators
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappveyor.yml
More file actions
68 lines (58 loc) · 2.17 KB
/
appveyor.yml
File metadata and controls
68 lines (58 loc) · 2.17 KB
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
version: '{build}'
skip_commits:
files:
- '**/*.md'
image: Visual Studio 2019
init:
- cmd: git config --global core.autocrlf false
nuget:
disable_publish_on_pr: true
before_build:
- ps: |
$ErrorActionPreference = "Stop"
$tagName = $env:APPVEYOR_REPO_TAG_NAME
if ($tagName -match '^v\d+\.\d+') # tag name starts with 'vX.Y'
{
$version = $tagName.Substring(1)
$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)
{
$version = $version.Substring(0, $version.IndexOf("-release"))
$env:SHOULD_CREATE_RELEASE = "true"
Write-Host "Will create release for $tagName tag" -ForegroundColor "Green"
}
$matchVersion = Select-String -Path ./version.json -Pattern "`"version`": `"$version`""
if ($matchVersion -eq $null)
{
Write-Error "Version in tag ($version) does not match version in version.json"
}
}
- cmd: dotnet --info
- cmd: dotnet restore ./GrobExp.Mutators.sln --verbosity minimal
- cmd: dotnet tool restore
build_script:
- cmd: dotnet build --configuration Release ./GrobExp.Mutators.sln
- cmd: dotnet pack --no-build --configuration Release ./GrobExp.Mutators.sln
test_script:
- cmd: dotnet jb cleanupcode GrobExp.Mutators.sln --profile=CatalogueCleanup --verbosity=WARN
- cmd: git diff --exit-code
- cmd: dotnet test --no-build --verbosity normal --configuration Release ./Mutators.Tests/Mutators.Tests.csproj
artifacts:
- path: './Mutators/bin/Release/*.nupkg'
deploy:
- provider: NuGet
server: https://nuget.org
api_key:
secure: y2RPf+gBBqffQVm8pg9qZcg99m7K8hsSa4z7VHvIE6t+kuO7r/oIqTVcryZzL93D
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