forked from jokedst/CsvQuery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
72 lines (60 loc) · 2.37 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
version: 1.2.1.{build}
image: Visual Studio 2017
environment:
access_token:
secure: hOmuEQQBrYPfKsYOoAFwkqlkTKkuO0JcXrBbwPIvD31cDC0PushXMF5MY/J+fZYE
platform:
- x64
- x86
configuration:
- Release
- Debug
cache:
- packages -> **\packages.config # cache "packages" directory until any packages.config is modified
services:
- mssql2017
install:
- nuget restore "%APPVEYOR_BUILD_FOLDER%"\CsvQuery\packages.config -PackagesDirectory "%APPVEYOR_BUILD_FOLDER%"\packages
build_script:
- cd "%APPVEYOR_BUILD_FOLDER%"
- msbuild CsvQuerySolution.sln /m /p:configuration="%configuration%" /p:platform="%platform%" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
after_build:
- cd "%APPVEYOR_BUILD_FOLDER%"\CsvQuery
- ps: >-
if ($($env:APPVEYOR_REPO_TAG) -eq "true" -and $env:CONFIGURATION -eq "Release") {
$ZipFileName = "CsvQuery-$($env:APPVEYOR_REPO_TAG_NAME)-$($env:PLATFORM).zip"
7z a $ZipFileName .\bin\$env:CONFIGURATION-$env:PLATFORM\CsvQuery.dll
Push-AppveyorArtifact $ZipFileName
$tagMessage = (git tag -n1 -l $($env:APPVEYOR_REPO_TAG_NAME))
echo $tagMessage
Add-AppveyorMessage "The tag message was $tagMessage"
Set-AppveyorBuildVariable 'TagMessage' $tagMessage
}
test_script:
- ps: |-
sqlcmd -S "(local)" -U "sa" -P "Password12!" -Q "CREATE DATABASE CsvQueryTest" -d "master"
vstest.console /Platform:$env:PLATFORM /logger:Appveyor "$env:APPVEYOR_BUILD_FOLDER\Tests\bin\$env:PLATFORM\$env:CONFIGURATION\Tests.dll"
artifacts:
- path: CsvQuery\CsvQuery*.zip
name: releases
# before_deploy:
# - git config --global credential.helper store
# - ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
# - git config --global user.email "Your email"
# - git config --global user.name "Your Name"
# - git commit ...
# - git push ...
deploy:
provider: GitHub
tag: $(appveyor_repo_tag_name)
release: "%APPVEYOR_REPO_TAG_NAME% %APPVEYOR_REPO_COMMIT_MESSAGE%"
description: "Release %APPVEYOR_REPO_TAG_NAME%"
auth_token:
secure: hOmuEQQBrYPfKsYOoAFwkqlkTKkuO0JcXrBbwPIvD31cDC0PushXMF5MY/J+fZYE
artifact: releases
draft: false
prerelease: true
force_update: true
on:
appveyor_repo_tag: true
configuration: Release