forked from unic/bob-keith
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
54 lines (46 loc) · 1.98 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
version: '{build}'
image: Visual Studio 2017
environment:
RepoName: bob-keith
NuGet_PackageId: Soulcode.Bob.Keith
Nuspec_File: .\%NuGet_PackageId%.nuspec
NuGetToken:
secure: MIDfhsEqZdzei5jcg09WbHgdHWltVQHF693zsxMtxEtxrHsA0M/qpyjuZeRWosdV
Artefact_Output_Dir: .\output
GithubEmail: [email protected]
GithubUsername: team-unic
GithubAccessTokenTeamUnic:
secure: BCEthL/NRFeg5eKK9CgmwbySILxWjMUjpvExHC0oGl1jjAT4kMBAohzh9m/xsVDh
install:
- choco install gitversion.portable -y
- ps: gitversion /l console /output buildserver
- ps: .\restore.ps1
# Setup GIT
- git config --global user.email %GithubEmail%
- git config --global user.name %GithubUsername%
- git config --global push.default simple
- git config --global core.autocrlf true
- git config --global core.safecrlf false
- git config --global credential.helper store
assembly_info:
patch: false
build_script:
- cmd: nuget pack %Nuspec_File% -version "%GitVersion_NuGetVersionV2%" -OutputDirectory %Artefact_Output_Dir%
- ps: |
$ErrorActionPreference = 'Stop';
.\generateDocs.ps1
- 7z a -r %Artefact_Output_Dir%\docs.zip %APPVEYOR_BUILD_FOLDER%\docs-generated\_book
after_build:
- cmd: appveyor PushArtifact %Artefact_Output_Dir%\%NuGet_PackageId%.%GitVersion_NuGetVersionV2%.nupkg
- cmd: appveyor PushArtifact %Artefact_Output_Dir%\docs.zip
test: off
deploy_script:
- ps: |
$ErrorActionPreference = 'Stop';
if($env:appveyor_repo_branch -eq 'master' -Or $env:appveyor_repo_tag -eq 'true') {
#nuget push "$($env:Artefact_Output_Dir)\$($env:NuGet_PackageId).$($env:GitVersion_NuGetVersionV2).nupkg" -ApiKey $($env:NuGetToken) -Source https://www.nuget.org/api/v2/package
}
if($env:appveyor_repo_tag -eq 'true') {
#Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GithubAccessTokenTeamUnic):[email protected]`n";
#.\pushDocs.ps1 $env:APPVEYOR_BUILD_FOLDER docs-generated\_book https://github.com/unic/$($env:RepoName).git
}