This repository has been archived by the owner on Aug 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
appveyor.yml
73 lines (67 loc) · 2.22 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
version: '{build}'
image: Visual Studio 2019
init:
- ps: |
If($Env:APPVEYOR_REPO_TAG -eq "true")
{
Write-Host "We now have a tagged release. Proper."
Write-Host "Tag is $Env:APPVEYOR_REPO_TAG_NAME"
$base = $env:APPVEYOR_REPO_TAG_NAME.split('-')[0]
$arr = $base.split(".")
$major = $arr[0]
$minor = $arr[1]
$patch = $arr[2]
Update-AppveyorBuild -Version "$major.$minor.$patch.$Env:APPVEYOR_BUILD_VERSION"
$env:CLEANTAG=$base
}
else
{
$releases = "https://api.github.com/repos/$env:APPVEYOR_REPO_NAME/releases"
$tag = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].tag_name
$base = $tag.Split("-")[0]
$arr = $base.split(".")
$major = $arr[0]
$minor = $arr[1]
$patch = $arr[2]
Update-AppveyorBuild -Version "$major.$minor.$patch.$Env:APPVEYOR_BUILD_VERSION-wip"
$env:CLEANTAG=$base
}
Write-Host "Hello. Build version is: $Env:APPVEYOR_BUILD_VERSION; Clean Tag: $Env:CLEANTAG"
before_build:
- cmd: >-
nuget restore SpeckleCore\SpeckleCore.sln
# version
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: $(CLEANTAG)
assembly_version: $(CLEANTAG)
file_version: $(CLEANTAG)
informational_version: $(CLEANTAG)
package_version: '{version}'
build:
publish_nuget: true
publish_nuget_symbols: true
use_snupkg_format: true
project: SpeckleCore\SpeckleCore.sln
verbosity: minimal
deploy:
provider: NuGet
server: # remove to push to NuGet.org
api_key:
secure: 5avZp2CuKwWIDcMTTQhXtRWX297z/dnZraZoSeGSey8W4stBeZIm5pZU38tTmJWZ
skip_symbols: false
symbol_server: # remove to push symbols to SymbolSource.org
on:
appveyor_repo_tag: true
notifications:
- provider: Slack
incoming_webhook:
secure: 9Kt/ImvGdsQ/dzmRdSaMIG+BO0R29MOJC7eZZnK5m5TyWwE+4nofEcYlb/r4lh9Z1Dx/bR+7oQtgAYO3W5s+qJshkT6Is9irYw3TfMZX7/M=
channel: '#devtalk'
template: Build <{{buildUrl}}|#{{buildVersion}}> (<{{commitUrl}}|{{commitId}}>) of {{repositoryName}}@{{branch}}) by {{commitAuthor}} {{status}} in {{duration}}
on_build_success: false
on_build_failure: true
on_build_status_changed: true
configuration:
- Release