forked from paolosalvatori/ServiceBusExplorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
107 lines (86 loc) · 4.04 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
105
106
107
init:
- git config --global core.autocrlf false
skip_tags: true
skip_commits:
files:
- '**/*.md'
- '**/images/*'
- '**/icons/*'
image: Visual Studio 2019
assembly_info:
patch: false
environment:
choco_token:
secure: 68Fr+kbT0ilhb84AyU/kKVWJw74urnreRDCpZ2L89v0cJeuEGcOchKGIFsy4Hp+V
#---------------------------------#
# restore nuget packages #
#---------------------------------#
before_build:
- nuget restore src\ServiceBusExplorer.sln
- cmd: echo %appveyor_build_version%
- ps: gitversion /l console /output buildserver /updateAssemblyInfo
- cmd: echo %appveyor_build_version%
- cmd: ECHO %GitVersion_MajorMinorPatch%
#---------------------------------#
# build configuration #
#---------------------------------#
# build platform, i.e. x86, x64, Any CPU. This setting is optional.
platform: Any CPU
# build Configuration, i.e. Debug, Release, etc.
configuration: Release
build:
parallel: true # enable MSBuild parallel builds
project: src\ServiceBusExplorer.sln # path to Visual Studio project
# MSBuild verbosity level
verbosity: normal # quiet|minimal|normal|detailed
#---------------------------------#
# after build - create zip #
#---------------------------------#
after_build:
- ps: >-
# Remove ALL xml files.
Push-Location $($env:APPVEYOR_BUILD_FOLDER)\src\ServiceBusExplorer\bin\Release
Get-ChildItem -Include *.xml -Recurse | % { Remove-Item $_.FullName }
Pop-Location
- ps: >-
# Reset VERIFICATION file.
(Set-Content -Value "VERIFICATION=MD5" -Path $env:APPVEYOR_BUILD_FOLDER\VERIFICATION.txt)
- ps: .\Generate-VerificationFile.ps1 -Version $env:GitVersion_MajorMinorPatch -TemplateFilePath VERIFICATION-Template.txt -ExePath "$($env:APPVEYOR_BUILD_FOLDER)\src\ServiceBusExplorer\bin\Release\ServiceBusExplorer.exe" -OutputFilePath "$($env:APPVEYOR_BUILD_FOLDER)\src\ServiceBusExplorer\bin\Release\VERIFICATION.txt"
- 7z a ServiceBusExplorer-%GitVersion_MajorMinorPatch%.zip %APPVEYOR_BUILD_FOLDER%\src\ServiceBusExplorer\bin\Release\*.*
- ps: (Get-Content $env:APPVEYOR_BUILD_FOLDER\src\ServiceBusExplorer\ServiceBusExplorer.nuspec).Replace("`$version`$", "$env:GitVersion_MajorMinorPatch") | Set-Content $env:APPVEYOR_BUILD_FOLDER\src\ServiceBusExplorer\ServiceBusExplorer.nuspec
- appveyor-retry choco pack %APPVEYOR_BUILD_FOLDER%\src\ServiceBusExplorer\ServiceBusExplorer.nuspec
#---------------------------------#
# after build - on_success #
#---------------------------------#
on_success:
- IF '%APPVEYOR_REPO_BRANCH%'=='master' IF '%APPVEYOR_PULL_REQUEST_NUMBER%'=='' appveyor-retry choco push ServiceBusExplorer.%GitVersion_MajorMinorPatch%.nupkg -k="'%choco_token%'"
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
- path: '*.zip' # bin\$(configuration)\*.*
name: 'ServiceBusExplorer-%GitVersion_MajorMinorPatch%'
- path: '*.nupkg'
name: 'ServiceBusExplorer-Chocolatey-%GitVersion_MajorMinorPatch%'
#---------------------------------#
# GitHub PR notifications #
#---------------------------------#
notifications:
- provider: GitHubPullRequest
auth_token:
secure: SDw1gs4noXA0eUpBoBcbT2XNYwf0Bg7gHR/TpP2Y/gQS/QYST7toE0oRzoKV/2U6 # encrypted token from GitHub
template: "{{#passed}}:white_check_mark:{{/passed}}{{#failed}}:x:{{/failed}} [Build {{&projectName}} {{buildVersion}} {{status}}]({{buildUrl}}) (commit {{commitUrl}} by @{{&commitAuthorUsername}})"
#---------------------------------#
# deployment configuration #
#---------------------------------#
deploy:
- provider: GitHub
auth_token:
secure: SDw1gs4noXA0eUpBoBcbT2XNYwf0Bg7gHR/TpP2Y/gQS/QYST7toE0oRzoKV/2U6 # encrypted token from GitHub
artifact: /.*\.*/ # upload all NuGet packages to release assets
description: ServiceBus Explorer build %APPVEYOR_BUILD_VERSION%.
draft: false
prerelease: false
tag: $(GitVersion_MajorMinorPatch)
on:
branch: master # release from master branch only