forked from Quahu/Qmmands
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
79 lines (64 loc) · 2.15 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
version: 'build-{build}'
image: Visual Studio 2017 Preview
environment:
EMAIL:
secure: no0uCdrnaWY/44Nfx6Tg+zE71d59XA/0nnJT9LznqtQ=
ACCESS_TOKEN:
secure: JIG9V7Fvjdpl1FvBGSTbv5s29nbAL3RcHiHgSaNC7WwoO2jUOBviIPHvQz2TcI/v
install:
- ps: choco install docfx -y
build_script:
- ps: dotnet restore .\src\Qmmands.sln | Out-Host
- ps: dotnet build .\src\Qmmands.sln -c "Release" --no-restore | Out-Host
after_build:
- ps: >-
$HasRepoTag = $Env:APPVEYOR_REPO_TAG -eq "true"
$BuildNumber = ([int] $Env:APPVEYOR_BUILD_NUMBER).ToString("00000")
$VersionSuffix = If ($HasRepoTag) {$BuildNumber} Else {"nightly-$BuildNumber"}
if ($HasRepoTag)
{
dotnet pack .\src\Qmmands -c Release -o .\..\..\artifacts --no-restore --no-build --version-suffix="$VersionSuffix" | Out-Host
}
else
{
dotnet pack .\src\Qmmands -c Release -o .\..\..\artifacts --no-restore --no-build | Out-Host
}
docfx docs/docfx.json | Out-Host
after_deploy:
- ps: $Directory = If ($HasRepoTag) {"stable\\"} Else {"nightly\\"}
- git config --global credential.helper store
- ps: Add-Content "$HOME\.git-credentials" "https://$($Env:ACCESS_TOKEN):[email protected]`n"
- ps: git config --global user.email $Env:EMAIL
- git config --global user.name "Quahu"
- git checkout gh-pages
- ps: If (-Not (Test-Path $Directory)) {mkdir $Directory}
- ps: Remove-Item "$Directory*" -Recurse
- git checkout -
- ps: Copy-Item ".\docs\_site\*" -Destination $Directory -Force -Recurse
- ps: cd $Directory
- git add .
- git checkout gh-pages
- ps: git commit -m "Updated docs to $VersionSuffix."
- git push origin gh-pages
nuget:
disable_publish_on_pr: true
pull_requests:
do_not_increment_build_number: true
test: off
artifacts:
- path: .\artifacts\*.nupkg
name: NuGet
deploy:
- provider: NuGet
server: https://www.myget.org/F/quahu/api/v2
api_key:
secure: XW7HgRlmPz8/YHNSCAjAzBbYvgTx1dVSA+OU8AmuU6OamtFJnUr2CCAbHukPg0r7
skip_symbols: true
on:
branch: master
appveyor_repo_tag: false
- provider: NuGet
api_key:
secure: O7xmTfASfpU1YlRDxaLRtK0Nkjt6T03B6K4oT96B32mNTw7K0ZbC7c8/dxe9yTqW
on:
appveyor_repo_tag: true