forked from sipsorcery-org/sipsorcery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
72 lines (72 loc) · 2.48 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
version: 4.0.{build}
branches:
except:
- gh-pages
- mac-ci
- ubuntu-ci
- wsl-ci
environment:
access_token:
# Token for github pages publishing.
secure: vhHzssxBhg0t4JAiWZZ1r/RTzsbKcGn16cxj7uBoPVVEJSaLaJ+gOdaUdsfX2ooI
image: Visual Studio 2022
configuration: Release
before_build:
- cmd: nuget restore -DisableParallelProcessing src\SIPSorcery.sln
build:
project: src\SIPSorcery.sln
publish_nuget: true
publish_nuget_symbols: true
use_snupkg_format: true
verbosity: quiet
after_build:
- cmd: ECHO "after_build"
#test:
# assemblies:
# only:
# - SIPSorcery.UnitTests.dll
# except:
# - SIPSorcery.IntegrationTests.dll
test_script:
- dotnet test test/unit/SIPSorcery.UnitTests.csproj -c Release
on_success:
- ps: |
if($env:APPVEYOR_REPO_BRANCH -eq "master" -and -Not $env:APPVEYOR_PULL_REQUEST_TITLE)
{
git config --global credential.helper store
Add-Content "$HOME\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" -NoNewline
git config --global user.email "aaron@sipsorcery.com"
git config --global user.name "Aaron Clauson"
git fetch
git checkout gh-pages -q
git merge master
choco install docfx -y
& docfx docfx\docfx.json
if ($lastexitcode -ne 0){
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
}
git status
git add -A
git commit -am "Appveyor CI updates"
git push origin gh-pages -q
}
deploy:
# Publish nuget package to nuget.org package repository.
- provider: NuGet
server: # If empty pushes to NuGet.org
api_key:
secure: aK5GHmF0JAaJZbd7x8g5G2b1qemnimHJMZ5rhQEexHsJJ2B0uVBh/W+KumXETBZz
skip_symbols: false
symbol_server: # If empty pushes symbols to SymbolSource.org
artifact: /.*\.nupkg/
on:
APPVEYOR_REPO_TAG: true # deploy on tag push only
# Publish nuget package to GitHub package repository.
- provider: NuGet
server: https://nuget.pkg.github.com/sipsorcery/index.json
artifact: /.*(\.|\.s)nupkg/
api_key:
secure: E58r+OknoQn8+bsPRT6l3U2K4kfOpDiGCo1C75LkVg+R/RBHpY//J8UCXEfVvyRB
skip_symbols: true # Symbols are already being pushed in the previous task.
on:
APPVEYOR_REPO_TAG: true # deploy on tag push only