-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathappveyor.yml
45 lines (43 loc) · 1.16 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
version: "0.0.{build}"
skip_non_tags: false
image: Visual Studio 2017
configuration: Release
init:
- ps: >-
function gitVersion() {
write-host "Setting version according to the git release tag."
$branch=$env:APPVEYOR_REPO_TAG_NAME
$posAfterVchar = $branch.LastIndexOf("v") + 1
$versionLength = $branch.Length - $posAfterVchar
$gitVersion=$branch.substring($posAfterVchar, $versionLength)
$newVersion="$gitVersion"
write-host "Update appveyor build version to:$newVersion"
$env:appveyor_build_version="$newVersion"
appveyor UpdateBuild -Version "$newVersion"
}
if ($env:APPVEYOR_REPO_TAG -eq $true) {
gitVersion
}
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
before_build:
- cmd: >-
dotnet restore
nuget restore
build:
verbosity: minimal
artifacts:
- path: Commander.NET\**\.nupkg
name: NuGet
deploy:
- provider: NuGet
on:
appveyor_repo_tag: true
api_key:
secure: Ra8pKYBYhJ+Qih20ptwaft2k+OjoJuS9/M+sXazXQN72q8/IkQzWbepl/G+PXLjS