forked from Aiko-IT-Systems/DisCatSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
134 lines (126 loc) · 4.31 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
-
branches:
only:
- main
version: 9.6.1-nightly-{build}
pull_requests:
do_not_increment_build_number: true
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 "dcs-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\dcs-docs.tar.xz
deploy:
- provider: NuGet
server:
api_key:
secure: eml4lPttwjBZg7WdwX3tbx34ZDNssgb2zwthatNbolRY0PnaCIswbuPClf9IWrw7
skip_symbols: true
- provider: GitHub
auth_token:
secure: oMF8sv9mhVjO7pBctQOwlmfd5aHQ4hvMoVCz77bgO9+1zBQSelPHxk0bCVfXNCCp
prerelease: true
force_update: true
on_success:
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
- ps: ./send.ps1 success $env:WEBHOOK_URL
on_failure:
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
- ps: ./send.ps1 failure $env:WEBHOOK_URL
# Releases
-
branches:
only:
- /release/
version: 9.6.1
pull_requests:
do_not_increment_build_number: true
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
# 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" -DocsPath ".\docs" -DocsPackageName "dcs-docs"
}
else
{
# Skip documentation
Write-Host "Building from PR ($Env:APPVEYOR_PULL_REQUEST_NUMBER); skipping docs build"
& .\rebuild-all.ps1 -ArtifactLocation "$dir" -Configuration "Release"
}
artifacts:
- path: artifacts\*.nupkg
- path: artifacts\dcs-docs.tar.xz
deploy:
- provider: NuGet
server:
api_key:
secure: eml4lPttwjBZg7WdwX3tbx34ZDNssgb2zwthatNbolRY0PnaCIswbuPClf9IWrw7
skip_symbols: true
- provider: GitHub
auth_token:
secure: oMF8sv9mhVjO7pBctQOwlmfd5aHQ4hvMoVCz77bgO9+1zBQSelPHxk0bCVfXNCCp
prerelease: false
force_update: true
on_success:
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
- ps: ./send.ps1 success $env:WEBHOOK_URL
on_failure:
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
- ps: ./send.ps1 failure $env:WEBHOOK_URL
# Old stuff
#- provider: NuGet
# server: https://nuget.pkg.github.com/Aiko-IT-Systems/index.json
# username: Lulalaby
# api_key:
# secure: 3l827zZPk7wTgnX2eZpc6bYcbOKVQnkB3xOkH43UTIHknJ0IMHrP7S6YNmgIRzkt
# skip_symbols: true