forked from DSharpPlus/DSharpPlus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
60 lines (56 loc) · 2.02 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
version: 4.2.0-nightly-{build}
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
- /release\/.*/
skip_tags: true
max_jobs: 1
image: Visual Studio 2019
clone_depth: 1
build_script:
- ps: |-
# Version number
$BUILD_NUMBER = [int]$Env:APPVEYOR_BUILD_NUMBER
$BUILD_SUFFIX = "nightly"
# 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: $BUILD_NUMBER / 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" -Configuration "Release" -VersionSuffix "$BUILD_SUFFIX" -BuildNumber $BUILD_NUMBER -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" -Configuration "Release" -VersionSuffix "$BUILD_SUFFIX" -BuildNumber $BUILD_NUMBER
}
artifacts:
- path: artifacts\*.nupkg
- path: artifacts\dsharpplus-docs.tar.xz
deploy:
- provider: NuGet
server: https://nuget.emzi0767.com/api/v2/package
api_key:
secure: 2FPGj0CvMvhz7C7BNX3debaLlgJiwZ99voNcwmQt2l+elxXQNIT36cdAl4qs6lTlsT7ffM+4EtRr9xMxZvuUHS44z0GD6tmlRZtyKYkUXc2YQvtDOmo14pLVoa+p94/kTWHNDLE4wa7sfPz//Uee5A==
symbol_server: https://nuget.emzi0767.com/api/v2/symbolpackage
notifications:
- provider: Slack
incoming_webhook:
secure: 6oAHVP26oRm4EUOaqyaXT7nkYNNbgZCWiZulyDW22vSNaVE+VWtAtgtOQVgtFF+9qpLyYu4A60QXPB0gD/0oFcJqGhPEKEVfASSLDqlO6USe6F2FnTxJJdmLIbFiunN4fq0qQmBqPR4pHXb+WoSM0GFi0wCHH7/5pbIoOtmT7L0=
channel: commits
on_build_success: true
on_build_failure: true
on_build_status_changed: false