-
Notifications
You must be signed in to change notification settings - Fork 3
/
appveyor.yml
66 lines (57 loc) · 1.95 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
image: Visual Studio 2017
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
- dev
nuget:
disable_publish_on_pr: true
before_build:
- ps: |
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
{
git checkout $env:APPVEYOR_REPO_BRANCH -q
choco install docfx -y
# choco install nuget.commandline -y
}
- nuget restore
build:
project: TelegramBotApi.sln
publish_nuget: true
after_build:
- ps: |
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
{
# & nuget install docfx.console -Version 2.18.4 -Source https://www.myget.org/F/docfx/api/v3/index.json
# & docfx.console.2.18.4\tools\docfx docs\docfx.json
& docfx docs\docfx.json
if ($lastexitcode -ne 0){
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
}
git config --global credential.helper store
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:git_token):[email protected]`n"
git config --global user.email $env:git_email
git config --global user.name $env:git_user
git clone https://github.com/crazypokemondev/TelegramBotApi.git -b gh-pages origin_site -q
Copy-Item origin_site/.git docs/_site -recurse
CD docs/_site
git add -A 2>&1 | % { $_.ToString() }
git commit -m "Auto Generated Docs" -q 2>&1 | % { $_.ToString() }
git push origin gh-pages -q --porcelain 2>&1 | % { $_.ToString() }
}
test:
assemblies:
- '**\TelegramBotApiUnitTest\**\*.dll'
artifacts:
- path: '**\*.nupkg'
name: Nuget
deploy:
# Deploying to NuGet feed
- provider: NuGet
on:
branch: master
api_key:
secure: oA0jnbpx2uv2Hkxzd4PegxHtKf0/tjrHLrSiMC+aJ7Mvi2elT276fqNYzGD0+G/w
skip_symbols: false
artifact: /Crazypokemondev\.TelegramBotApi\..*\.nupkg/