forked from json-api-dotnet/JsonApiDotNetCore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
112 lines (96 loc) · 3.06 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
100
101
102
103
104
105
106
107
108
109
110
111
112
version: '{build}'
os: Visual Studio 2019
environment:
POSTGRES_PORT: tcp://localhost:5432
POSTGRES_ENV_POSTGRES_USER: postgres
POSTGRES_ENV_POSTGRES_PASSWORD: Password12!
POSTGRES_ENV_POSTGRES_DB: JsonApiDotNetCoreExample
PGUSER: postgres
PGPASSWORD: Password12!
Data:DefaultConnection: "Host=localhost;Port=5432;Database=JsonApiDotNetCoreExample;User ID=postgres;Password=Password12!"
ACCESS_TOKEN:
secure: g1T332Uarmdgtkftchpafa8tDP/7eM4O0BD6iu1wu+zR224IyH5R8pb4sTChr4Ia
# REF: https://github.com/docascode/docfx-seed/blob/master/appveyor.yml
before_build:
- ps: |
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
{
git checkout $env:APPVEYOR_REPO_BRANCH -q
choco install docfx -y
}
after_build:
- ps: |
CD ./docs
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
{
& docfx 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:ACCESS_TOKEN):[email protected]`n"
git config --global user.email "[email protected]"
git config --global user.name "Jared Nance"
git config --global core.autocrlf false
git config --global core.safecrlf false
git clone https://github.com/json-api-dotnet/JsonApiDotNetCore.git -b gh-pages origin_site -q
Copy-Item origin_site/.git _site -recurse
CD _site
git add -A 2>&1
git commit -m "CI Updates" -q
git push origin gh-pages -q
echo "Documentation updated successfully."
}
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
- develop
- unstable
- /release\/.+/
nuget:
disable_publish_on_pr: true
init:
- SET PATH=C:\Program Files\PostgreSQL\9.6\bin\;%PATH%
services:
- postgresql
build_script:
- ps: createdb JsonApiDotNetCoreExample
- ps: dotnet --version
- ps: .\Build.ps1
test: off
artifacts:
- path: .\**\artifacts\**\*.nupkg
name: NuGet
deploy:
- provider: NuGet
server: https://www.myget.org/F/research-institute/api/v2/package
api_key:
secure: 6CeYcZ4Ze+57gxfeuHzqP6ldbUkPtF6pfpVM1Gw/K2jExFrAz763gNAQ++tiacq3
skip_symbols: false
symbol_server: https://www.myget.org/F/research-institute/symbols/api/v2/package
on:
branch: develop
- provider: NuGet
server: https://www.myget.org/F/jadnc/api/v2/package
api_key:
secure: 6CeYcZ4Ze+57gxfeuHzqP6ldbUkPtF6pfpVM1Gw/K2jExFrAz763gNAQ++tiacq3
skip_symbols: false
on:
branch: unstable
- provider: NuGet
name: production
skip_symbols: false
api_key:
secure: /fsEOgG4EdtNd6DPmko9h3NxQwx1IGDcFreGTKd2KA56U2KEkpX/L/pCGpCIEf2s
on:
branch: master
appveyor_repo_tag: true
- provider: NuGet
skip_symbols: false
api_key:
secure: /fsEOgG4EdtNd6DPmko9h3NxQwx1IGDcFreGTKd2KA56U2KEkpX/L/pCGpCIEf2s
on:
branch: /release\/.+/
appveyor_repo_tag: true