forked from Speedygeek/ZendeskApi_v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
81 lines (64 loc) · 2.41 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
# Do not build feature branch with open Pull Requests
skip_branch_with_pr: true
# Maximum number of concurrent jobs for the project
max_jobs: 1
image: Previous Visual Studio 2017
pull_requests:
do_not_increment_build_number: true
configuration: Release
nuget:
disable_publish_on_pr: true
# scripts that are called at very beginning, before repo cloning
init:
- git config --global core.autocrlf input
before_build:
- dotnet restore .\src\ZendeskApi_v2.sln
build:
project: \src\ZendeskApi_v2.sln
verbosity: minimal
test:
assemblies: '.\test\**\bin\**\*test.dll'
artifacts:
- path: src\ZendeskApi_v2\bin\Release\ZendeskApi_v2.*.nupkg
name: Package
deploy:
- provider: Environment
name: Public Nuget
on:
branch: master
APPVEYOR_REPO_TAG: true
- provider: Environment
name: PreRelease Nuget Feed
on:
branch: master
APPVEYOR_REPO_TAG: false
notifications:
- provider: GitHubPullRequest
on_build_success: true
on_build_failure: true
on_build_status_changed: false
install:
- ps: >-
# set strong cryptography on 64 bit .Net Framework (version 4 and above)
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
# set strong cryptography on 32 bit .Net Framework (version 4 and above)
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
choco install gitversion.portable --pre --no-progress -y
$output = gitversion
$joined = $output -join "`n"
$versionInfo = $joined | ConvertFrom-Json
$versionInfo | % { foreach ($property in $_.PSObject.Properties) { Set-AppveyorBuildVariable -Name "GitVersion_$($property.Name)" -Value "$($_.PSObject.properties[$property.Name].Value)" }}
$script_versionNumber = "$($versionInfo.NuGetVersionV2).build.$($env:APPVEYOR_BUILD_ID)"
Update-AppveyorBuild -Version $script_versionNumber
$env:script_versionNumber = $script_versionNumber
$env:APPVEYOR_PATCHING_VERSION = "$($versionInfo.AssemblySemVer)"
Write-Host "Build version: " $script_versionNumber
Write-Host "Assembly version: " $env:APPVEYOR_PATCHING_VERSION
if($script_versionNumber.contains("-")) {
$env:Is_Prerelease = 'true'
}
else
{
$env:Is_Prerelease = 'false'
}
Write-Host "Is the build Prerelease: " $env:Is_Prerelease