Repository navigation
Expand file tree
/
Copy pathappveyor.yml
More file actions
76 lines (61 loc) · 2.89 KB
/
Copy pathappveyor.yml
File metadata and controls
76 lines (61 loc) · 2.89 KB
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
version: 1.0.0.{build}
image: Visual Studio 2017
environment:
matrix:
- PlatformToolset: VS15
- PlatformToolset: VS17
platform:
- x64
- Any CPU
configuration:
- Release
- Debug
install:
- if "%platform%"=="x64" set archi=amd64
- if "%platform%"=="x64" set platform_input=x64
- if "%platform%"=="Any CPU" set archi=x86
- if "%platform%"=="Any CPU" set platform_input=Any CPU
- if "%PlatformToolset%"=="VS15" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %archi%
- if "%PlatformToolset%"=="VS17" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
#package restoring
- nuget restore "%APPVEYOR_BUILD_FOLDER%"\S2CEntitiesBase\packages.config -PackagesDirectory "%APPVEYOR_BUILD_FOLDER%"\NppS2CPlugin\packages
- nuget restore "%APPVEYOR_BUILD_FOLDER%"\S2CModelClient\packages.config -PackagesDirectory "%APPVEYOR_BUILD_FOLDER%"\NppS2CPlugin\packages
- nuget restore "%APPVEYOR_BUILD_FOLDER%"\OAuth2.Mvc\packages.config -PackagesDirectory "%APPVEYOR_BUILD_FOLDER%"\NppS2CPlugin\packages
- nuget restore "%APPVEYOR_BUILD_FOLDER%"\NppS2CPlugin\NppS2CPlugin\packages.config -PackagesDirectory "%APPVEYOR_BUILD_FOLDER%"\NppS2CPlugin\packages
build_script:
- cd "%APPVEYOR_BUILD_FOLDER%"/NppS2CPlugin
- msbuild NppS2CPlugin.sln /m /p:configuration="%configuration%" /p:platform="%platform_input%" /p:PlatformToolset="%PlatformToolset%" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
after_build:
- cd "%APPVEYOR_BUILD_FOLDER%"/NppS2CPlugin/NppS2CPlugin
- ps: >-
if ($env:PLATFORM_INPUT -eq "x64") {
Push-AppveyorArtifact "bin\$env:PLATFORM_INPUT\$env:CONFIGURATION\Snip2Code.dll" -FileName Snip2Code.dll
}
if ($env:PLATFORM_INPUT -eq "Any CPU" ) {
Push-AppveyorArtifact "bin\$env:CONFIGURATION\Snip2Code.dll" -FileName Snip2Code.dll
}
if ($($env:APPVEYOR_REPO_TAG) -eq "true" -and $env:CONFIGURATION -eq "Release" -and $env:PLATFORMTOOLSET -eq "VS17") {
if($env:PLATFORM_INPUT -eq "x64"){
$ZipFileName = "NppS2CPlugin_$($env:APPVEYOR_REPO_TAG_NAME)_x64.zip"
7z a $ZipFileName bin\$env:PLATFORM_INPUT\$env:CONFIGURATION\Snip2Code.dll
}
if($env:PLATFORM_INPUT -eq "Any CPU"){
$ZipFileName = "NppS2CPlugin_$($env:APPVEYOR_REPO_TAG_NAME)_x86.zip"
7z a $ZipFileName bin\$env:CONFIGURATION\Snip2Code.dll
}
}
artifacts:
- path: NppS2CPlugin_*.zip
name: releases
deploy:
provider: GitHub
auth_token:
secure: !!TODO, see https://www.appveyor.com/docs/deployment/github/#provider-settings!!
artifact: releases
draft: false
prerelease: false
force_update: true
on:
appveyor_repo_tag: true
PlatformToolset: VS17
configuration: Release