-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
104 lines (93 loc) · 3.51 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#--------------------------------------------------
# Build worker image (VM template)
#--------------------------------------------------
image: Visual Studio 2019
#--------------------------------------------------
# Environment
#--------------------------------------------------
environment:
GITHUB_PERSONAL_ACCESS_TOKEN:
secure: Me6ap8ymREJWZ6eauE3ynUjq2e+xPQF3fMOc0+cUmdG0wM8a96KAO/pCiPzYH7rX
GIT_CONFIG_USER_EMAIL:
secure: yAZjzbVhtfeKof5pGJ/N65IjSffBIJoX5MZIpqbtHkc=
#--------------------------------------------------
# Branch whitelist
#--------------------------------------------------
branches:
# Whitelist
only:
- master
# Do not build on tags, since we auto-commit tags.
skip_tags: true
#--------------------------------------------------
# After cloning repository
#--------------------------------------------------
install:
- git submodule init
- git submodule update
#--------------------------------------------------
# Build configuration
#--------------------------------------------------
configuration: Release
#--------------------------------------------------
# Build command
#--------------------------------------------------
build:
# Publish symbols, as per: https://www.appveyor.com/docs/build-phase/#packaging-symbols
publish_nuget: true
publish_nuget_symbols: true
use_snupkg_format: true
#--------------------------------------------------
# Build hooks - before
#--------------------------------------------------
before_build:
# Patch version in directory.build.props
- ps: $temp_path = (Get-Item directory.build.props).FullName
- ps: $temp_csproj = [xml](Get-Content $temp_path)
- ps: $temp_csproj.Project.PropertyGroup.Version = $temp_csproj.Project.PropertyGroup.Version -replace '\.[0-9]+$', ".$env:APPVEYOR_BUILD_NUMBER"
- ps: $temp_csproj.Save($temp_path)
- ps: $env:APPVEYOR_BUILD_VERSION = $temp_csproj.Project.PropertyGroup.Version
- ps: Write-Host "Build version set to - $env:APPVEYOR_BUILD_VERSION"
# Restore
- dotnet restore
#--------------------------------------------------
# Testing
#--------------------------------------------------
test:
assemblies:
only:
- '**\*.Tests.dll'
#--------------------------------------------------
# Build hooks - on_success
#
# Tags the repository in GitHub with the release version.
#--------------------------------------------------
on_success:
- git config --global credential.helper store
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GITHUB_PERSONAL_ACCESS_TOKEN):x-oauth-basic@github.com`n"
- git config --global user.email "%GIT_CONFIG_USER_EMAIL%"
- git config --global user.name "One Frame Link"
- git tag "v%APPVEYOR_BUILD_VERSION%"
- git push origin "v%APPVEYOR_BUILD_VERSION%"
#--------------------------------------------------
# NuGet config
#--------------------------------------------------
nuget:
# disable publishing of .nupkg artifacts to
# account/project feeds for pull request builds
disable_publish_on_pr: true
#--------------------------------------------------
# Deploy NuGet
#--------------------------------------------------
deploy:
provider: NuGet
api_key:
secure: hInn84XY2ZsjWlv4+KpondF3RcR/mH4shEOsvpRhC6/6KT94kPL5rV+hm0Qv3LWv
skip_symbols: false
#--------------------------------------------------
# Notifications
#--------------------------------------------------
notifications:
- provider: Slack
incoming_webhook:
secure: Y4pw1Q3aqUk/4aVYHN5R3u5Zca5ijyVi6tRAVahXhlFXFCZTwpJLrEwHsRGoqQGIkUUpAOvlOpVRNoXBKJhfwkHybRotzfi7SbbB8Rb+67I=