-
Notifications
You must be signed in to change notification settings - Fork 3
/
appveyor.yml
99 lines (75 loc) · 3.02 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
#---------------------------------------------#
# build/environment configuration #
#---------------------------------------------#
version: '{build}'
build:
project: Exprelsior.sln
verbosity: minimal
image: Visual Studio 2019
configuration: Release
platform: Any CPU
cache:
- '%LocalAppData%\NuGet\v3-cache' # NuGet v3
environment:
certificate_pass:
secure: 4HtCHAFuggxhqnism3hA/sk1r3paygf0KLvQwzy1S+0=
certificate_container_name:
secure: CEDPYyDEmpw2yxtLGjryfesP1SSi8LtCDKf6FN6sDC4=
#-------------------------------------#
# pre-build configuration #
#-------------------------------------#
before_build:
# Extract version, release notes, pre-release flag.
- ps: |
$props = ([xml](Get-Content "Directory.Build.props")).Project.PropertyGroup
$vPrefix = $props.VersionPrefix
$vSuffix = $props.VersionSuffix
$releaseNotes = if ($props.PackageReleaseNotes.GetType() -eq [System.Xml.XmlElement]) { $props.PackageReleaseNotes.InnerText } else { $props.PackageReleaseNotes }
$env:fullVersion = @{ $true = "$($vPrefix)-$($vSuffix)"; $false = $($vPrefix) }[-not ([string]::IsNullOrEmpty($vSuffix))]
$env:isPreRelease = @{ $true = "true"; $false = "false" }[-not ([string]::IsNullOrEmpty($vSuffix))]
$env:releaseNotes = @{ $true = $releaseNotes.Replace("`n", '\n').TrimEnd().Trim('\n'); $false = "$env:fullVersion release!" }[-not ([string]::IsNullOrEmpty($releaseNotes))]
Update-AppveyorBuild -Version "$env:fullVersion Build-$env:APPVEYOR_BUILD_VERSION"
# Import PFX file for strong naming assemblies.
- ps: |
Start-Process -FilePath "$env:APPVEYOR_BUILD_FOLDER\SnInstallPfx.exe" -ArgumentList "$env:APPVEYOR_BUILD_FOLDER\ExprelsiorKey.pfx $env:certificate_pass" -NoNewWindow
- ps: dotnet restore
#-----------------------------------------#
# build trigger configuration #
#-----------------------------------------#
skip_commits:
files:
- '**/*.md'
- 'license'
skip_tags: false
#-----------------------------------#
# publish configuration #
#-----------------------------------#
nuget:
disable_publish_on_pr: true
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
- path: Exprelsior/bin/$(configuration)/Binaries
name: Exprelsior.$(fullVersion)
type: zip
- path: Exprelsior/bin/$(configuration)/Package/*.nupkg
- path: Exprelsior.Shared/bin/$(configuration)/Package/*.nupkg
#---------------------------------#
# deploy configuration #
#---------------------------------#
deploy:
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
description: $(releaseNotes)
draft: false
prerelease: $(isPreRelease)
auth_token:
secure: 17uIp5Xz3DUfAUcfU6n/DajZ45rm5HVKrhTYVYJ4Z8XocWZvtSzhfZTfak6P6emy
on:
APPVEYOR_REPO_TAG: true
- provider: NuGet
api_key:
secure: pF8W2j/TXfR8dLUpvBIabRDxkz0ye8u+cCQrsWOczf5C6QiyRKWY8M6dvbW1fAcK
on:
APPVEYOR_REPO_TAG: true