forked from ClosedXML/ClosedXML.Report
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
91 lines (72 loc) · 2.25 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
# common configuration for ALL branches
version: 0.2.0.{build}
pull_requests:
do_not_increment_build_number: true
os: Visual Studio 2019
image: Visual Studio 2019
skip_branch_with_pr: true
environment:
AppVeyor: APPVEYOR
init:
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq 'true')
{
$env:fileVersion = $env:APPVEYOR_REPO_TAG_NAME -replace '(\d+)\.(\d+)\.(\d+)(-.+)?', '$1.$2.$3'
if ($env:fileVersion -eq $env:APPVEYOR_REPO_TAG_NAME) { $env:fileVersion = $($env:fileVersion + '.0') }
else { $env:fileVersion = $($env:fileVersion + '.' + $env:APPVEYOR_BUILD_NUMBER) }
$env:productVersion = $env:APPVEYOR_REPO_TAG_NAME
}
else
{
$env:fileVersion = $env:APPVEYOR_BUILD_VERSION -replace '(\d+)\.(\d+)\.([^.]+)\.(\d+)', '$1.$2.999.$4'
$env:productVersion = $env:fileVersion
}
$env:signed = $env:CONFIGURATION.Substring(7)
Update-AppveyorBuild -Version $env:fileVersion
Write-Host $env:fileVersion $env:productVersion
Write-Host $env:APPVEYOR_REPO_TAG $env:APPVEYOR_REPO_TAG_NAME
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '$(productVersion)'
package_version: '$(productVersion)'
assembly_version: '$(fileVersion)'
file_version: '$(fileVersion)'
informational_version: '$(productVersion)'
# platform: Any CPU
configuration:
- Release
- Release.Signed
before_build:
- cmd: nuget update -self
- nuget restore
build:
verbosity: minimal
test_script:
- dotnet test tests/ClosedXML.Report.Tests
after_build:
- cd ClosedXML.Report/bin/%CONFIGURATION%/
- 7z a ClosedXML.Report%signed%_%productVersion%.zip */ClosedXML.Report.dll
- cd ../../../
artifacts:
- path: ClosedXML.Report/bin/%CONFIGURATION%/*.zip
- path: ClosedXML.Report/bin/%CONFIGURATION%/*/ClosedXML.Report.dll
- path: ClosedXML.Report/bin/%CONFIGURATION%/*.nupkg
nuget:
project_feed: true
disable_publish_on_pr: true
deploy:
- provider: GitHub
artifact: /.*\.(zip|nupkg)/
auth_token:
secure: pDyyONympYgPQfMzsAlP01i2i17xji0oFlz5sKVmM6n34/TieVjBjvUjSUFxNQEA
draft: true
on:
APPVEYOR_REPO_TAG: true
- provider: NuGet
artifact: /.*\.nupkg/
skip_symbols: false
api_key:
secure: GZMuY+C0BuVSLsTJ0b2oLNVNXdd8ffaFJapOaUDKlrfOLmrHc0S44AqSE6pjK1yC
on:
APPVEYOR_REPO_TAG: true