-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathappveyor.yml
113 lines (100 loc) · 4.58 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
platform: Any CPU
configuration: Release
clone_depth: 1
version: 6.0.0.{build}
image: Visual Studio 2022
matrix:
fast_finish: true
# enable AssemblyInfo.cs patching with build version number
assembly_info:
patch: true
file: AssemblyInfo.*
assembly_version: "{version}"
assembly_file_version: "{version}"
assembly_informational_version: "{version}"
# restore NuGet packages before running MSBuild
before_build:
- echo CD %CD%
- echo APPVEYOR %APPVEYOR%
- echo APPVEYOR_PROJECT_NAME %APPVEYOR_PROJECT_NAME%
- echo APPVEYOR_PROJECT_SLUG %APPVEYOR_PROJECT_SLUG%
- echo APPVEYOR_BUILD_FOLDER %APPVEYOR_BUILD_FOLDER%
- echo APPVEYOR_BUILD_ID %APPVEYOR_BUILD_ID%
- echo APPVEYOR_BUILD_NUMBER %APPVEYOR_BUILD_NUMBER%
- echo APPVEYOR_BUILD_VERSION %APPVEYOR_BUILD_VERSION%
- echo APPVEYOR_JOB_ID %APPVEYOR_JOB_ID%
- echo APPVEYOR_JOB_NAME %APPVEYOR_JOB_NAME%
- echo APPVEYOR_JOB_NUMBER %APPVEYOR_JOB_NUMBER%
- echo APPVEYOR_REPO_NAME %APPVEYOR_REPO_NAME%
- echo APPVEYOR_REPO_BRANCH %APPVEYOR_REPO_BRANCH%
- echo APPVEYOR_REPO_TAG %APPVEYOR_REPO_TAG%
- echo APPVEYOR_REPO_TAG_NAME %APPVEYOR_REPO_TAG_NAME%
- echo APPVEYOR_REPO_COMMIT %APPVEYOR_REPO_COMMIT%
- echo APPVEYOR_REPO_COMMIT_TIMESTAMP %APPVEYOR_REPO_COMMIT_TIMESTAMP%
- dotnet tool install --global coveralls.net --version 1.0.0
- nuget update -self
- nuget restore Maestro.sln
- dotnet tool update -g docfx
- echo Does (%APPVEYOR_BUILD_FOLDER%) a .git subdir (ie. Is a clone)?
- dir /a:hd %APPVEYOR_BUILD_FOLDER%
environment:
COVERALLS_REPO_TOKEN:
secure: brg0Fy+w8aO/4JhYrsjvumIqAMCi26QNT3nJGUQNaKvLXSoXgywWn/WPCEnUJEEK
build:
verbosity: minimal
parallel: true
project: Maestro.sln
after_build:
- publish.bat %CONFIGURATION%
- set ARTIFACT_RELEASE_LABEL=%APPVEYOR_BUILD_VERSION%
- appveyor_postbuild.bat
test_script:
- ps: >-
dotnet test --logger:"trx;LogFileName=$(Get-Location)\TestResult.xml" /p:CollectCoverage=true /p:CoverletOutput="$(Get-Location)\OpenCoverCoverage.xml" /p:CoverletOutputFormat=lcov /p:CoverletOutputFormat=opencover .\Core.sln
& csmacnz.coveralls --opencover -i .\OpenCoverCoverage.net6.0.xml --repoToken $env:COVERALLS_REPO_TOKEN --commitId $env:APPVEYOR_REPO_COMMIT --commitBranch $env:APPVEYOR_REPO_BRANCH --commitAuthor $env:APPVEYOR_REPO_COMMIT_AUTHOR --commitEmail $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL --commitMessage $env:APPVEYOR_REPO_COMMIT_MESSAGE --jobId $env:APPVEYOR_JOB_ID
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/xunit/$env:APPVEYOR_JOB_ID", (Resolve-Path .\TestResult.xml))
artifacts:
- path: .\artifacts\MapGuideMaestro-$(configuration)-$(ARTIFACT_RELEASE_LABEL)-Setup.exe
name: installer_windows
- path: .\artifacts\MapGuideMaestro-$(configuration)-$(ARTIFACT_RELEASE_LABEL).zip
name: portable_package
- path: .\Docs\_site
name: docs
- path: .\artifacts\MgTileSeeder-win-x64-$(ARTIFACT_RELEASE_LABEL).zip
name: seeder_windows
- path: .\artifacts\MgTileSeeder-linux-x64-$(ARTIFACT_RELEASE_LABEL).zip
name: seeder_linux
- path: .\artifacts\Maestro-MapPublisher-win-x64-$(ARTIFACT_RELEASE_LABEL).zip
name: publisher_windows
- path: .\artifacts\Maestro-MapPublisher-linux-x64-$(ARTIFACT_RELEASE_LABEL).zip
name: publisher_linux
- path: .\artifacts\*nupkg
name: nuget_packages
type: NuGetPackage
# - path: .\artifacts\Maestro-SDK-$(ARTIFACT_RELEASE_LABEL).zip
# name: sdk
# type: zip
deploy:
- provider: GitHub
release: $(appveyor_repo_tag_name)
description: 'Release $(appveyor_repo_tag_name) ($(appveyor_build_version))'
auth_token:
secure: Dw0UkS+M9jDa7xofORbKLKgTBWZsBTN56QA7xD7F0pCCdNqnLH3K5oFk3smWjRfX
# artifact: installer_windows,sdk
artifact: installer_windows,portable_package,nuget_packages,seeder_windows,seeder_linux
draft: true
prerelease: true
on:
branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only
- provider: NuGet
server: # remove to push to NuGet.org
api_key:
secure: rdu4ZWGKQFndZZ8QfRH0UI7mHiR4DHG9pa9oKRRR1yMJJ7uIu0U3VhsftXOEA1YY
skip_symbols: false
symbol_server: # remove to push symbols to SymbolSource.org
artifact: /.*(\.|\.s)nupkg/
on:
branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only