forked from FoundatioFx/Foundatio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappveyor.yml
More file actions
87 lines (73 loc) · 2.33 KB
/
appveyor.yml
File metadata and controls
87 lines (73 loc) · 2.33 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: 4.2.{build}
os: Visual Studio 2015
clone_depth: 2
configuration: Release
pull_requests:
do_not_increment_build_number: true
init:
- git config --global core.autocrlf true
- ps: $env:GIT_HASH=$env:APPVEYOR_REPO_COMMIT.Substring(0, 10)
- ps: If ("$env:APPVEYOR_REPO_BRANCH" -ne "master") { $env:VERSION_SUFFIX="-pre" }
assembly_info:
patch: true
file: AssemblyInfo.*
assembly_version: "{version}.0"
assembly_file_version: "{version}.0"
assembly_informational_version: "{version}$(VERSION_SUFFIX) $(GIT_HASH)"
before_build:
- ps: >-
Get-ChildItem -Path .\ -Filter project.json -Recurse -Name |
ForEach {
$content = Get-Content "$_"
$content = $content.Replace("99.99.99-dev", "$($env:APPVEYOR_BUILD_VERSION)$($env:VERSION_SUFFIX)")
Set-Content "$_" $content -Encoding UTF8
}
- dotnet restore -v Minimal
build_script:
- ps: >-
dotnet build **/project.json -c Release
If ($LASTEXITCODE -ne 0) {
throw "One or more projects failed to build."
}
before_test:
- nuget install redis-64 -excludeversion
- redis-64\tools\redis-server.exe --service-install
- redis-64\tools\redis-server.exe --service-start
- choco install rabbitmq --ignoredependencies -y
- ps: (Get-Service -Name RabbitMQ).Status
test_script:
- ps: >-
DIR "test/*.Tests" | Where {$_.PsIsContainer} | ForEach {
Push-Location -Path "$_"
dotnet test -c Release
Pop-Location
If ($LASTEXITCODE -ne 0) {
$testFailure = $True
}
}
If ($testFailure) {
throw "One or more tests failed."
}
after_test:
- ps: >-
DIR "src/*" | Where {$_.PsIsContainer} | ForEach {
dotnet pack "$_" -c Release -o .\artifacts\
}
artifacts:
- path: artifacts\*.nupkg
name: ReleaseArtifacts
deploy:
- provider: Environment
name: NuGet
- provider: GitHub
auth_token:
secure: 0s81q7bweVLTFSOKxnIhan7el6bIFiN8HJ1kYJzOkeFXX7wgGSq9bs/rV53X9qpf
draft: true
on:
branch: master
appveyor_repo_tag: true
notifications:
- provider: Slack
auth_token:
secure: GniMpFE62HprSyQNQoej/fBOAdbQe8EMWAMMNXX0s2JxeNePjemiO1bCf4eYweE4p70mm0sCwMjeEP/Ps9aTMA==
channel: '#notifications'