forked from DSharpPlus/DSharpPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
66 lines (46 loc) · 1.56 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
version: 4.0.0-beta-{build}
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
skip_tags: true
max_jobs: 1
image: Visual Studio 2017
clone_depth: 1
build_script:
- ps: >-
# Version number
$VERSION = [int]::Parse($Env:APPVEYOR_BUILD_NUMBER).ToString("00000")
# Branch
$BRANCH = "$Env:APPVEYOR_REPO_BRANCH"
$Env:DOCFX_SOURCE_BRANCH_NAME = "$BRANCH"
# Output directory
$Env:ARTIFACT_DIR = ".\artifacts"
$dir = New-Item -type directory $env:ARTIFACT_DIR
$dir = $dir.FullName
# Verbosity
Write-Host "Build: $VERSION / Branch: $BRANCH"
Write-Host "Artifacts will be placed in: $dir"
# Check if this is a PR
if (-not $Env:APPVEYOR_PULL_REQUEST_NUMBER)
{
# Rebuild documentation
Write-Host "Commencing complete build"
& .\rebuild-all.ps1 -ArtifactLocation "$dir" -VersionSuffix "$VERSION" -Configuration "Release" -DocsPath ".\docs" -DocsPackageName "dsharpplus-docs"
}
else
{
# Skip documentation
Write-Host "Building from PR ($Env:APPVEYOR_PULL_REQUEST_NUMBER); skipping docs build"
& .\rebuild-all.ps1 -ArtifactLocation "$dir" -VersionSuffix "$VERSION" -Configuration "Release"
}
artifacts:
- path: artifacts\*.nupkg
- path: artifacts\dsharpplus-docs.tar.xz
deploy:
- provider: NuGet
server: https://www.myget.org/F/dsharpplus-nightly/api/v2/package
api_key:
secure: Zrcd8tC2HncrLbVMK2rD6pcfnS3txk85Enf7Totc4g9sYVMhtHcKVPfOrtFuPW6h
symbol_server: https://www.myget.org/F/dsharpplus-nightly/symbols/api/v2/package