forked from DSharpPlus/DSharpPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
51 lines (47 loc) · 1.67 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
version: 4.0.0-nightly-{build}
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
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: gwTVmrx sCJ NMimUtrU0yoH8FcnkLphNMvGjRRkd04yN0Z2sgbgXh0ZsWYs9JJXDazeMUiroemb3HZBkg34Q2tQ9XEu5iXUVdqMNplpA0V2cxnFOv4OhDyHVSO9CPnwMhNGLaUwH4W MEW1znYWLA==
symbol_server: https://nuget.emzi0767.com/api/v2/symbolpackage