-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
45 lines (35 loc) · 1.66 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
image: Visual Studio 2019
cache:
- packages -> **\packages.config, nuget.config
- tools -> build.cake, build.ps1
environment:
_DOTNET_VERSION: "3.1.101"
install:
- choco install gitversion.portable -pre -y
- ps: New-Item -Name ".tmp" -ItemType "directory"
- ps: "[Net.ServicePointManager]::SecurityProtocol = 'Tls12'"
- ps: Invoke-WebRequest https://dot.net/v1/dotnet-install.ps1 -OutFile .tmp\dotnet-install.ps1
- ps: if ((-Not (Test-Path .tmp\dotnet\dotnet.exe)) -or (((.tmp\dotnet\dotnet.exe --version) -Join '') -ne $Env:_DOTNET_VERSION)) { .tmp\dotnet-install.ps1 -Version $Env:_DOTNET_VERSION -InstallDir dotnet } else { $Env:path = $Env:APPVEYOR_BUILD_FOLDER + "\.tmp\dotnet\dotnet.exe;" + $Env:path }
before_build:
- ps: gitversion $env:APPVEYOR_BUILD_FOLDER /l console /output buildserver /updateAssemblyInfo /nofetch /b $env:APPVEYOR_REPO_BRANCH
build_script:
- ps: ./build.ps1
after_build:
7z a ./AnimeListBot.zip ./artifacts/*
clone_script:
- cmd: git clone --recursive --branch=%APPVEYOR_REPO_BRANCH% https://github.com/%APPVEYOR_REPO_NAME%.git %APPVEYOR_BUILD_FOLDER%
- cmd: git checkout -f %APPVEYOR_REPO_COMMIT%
- cmd: git lfs pull
test: off
artifacts:
- path: ./msbuild.log
name: Build Log
- path: ./AnimeListBot.zip
name: AnimeListBot
type: zip
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_PASSED
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_FAILED