-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathappveyor.yml
108 lines (90 loc) · 3.18 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
image: Visual Studio 2022
version: '1.0.{build}'
branches:
only:
- master
- Development
configuration:
- Release
platform: Any CPU
environment:
# Don't report back to the mothership
DOTNET_CLI_TELEMETRY_OPTOUT: 1
SNK_PASSPHRASE:
secure: hAvbiLFI38bO0EdEXv77Xk0P3slfTlGq+jaD5JY0VaE=
SNK_SALT:
secure: F/vXSd1ELO8L1EkLnaFLgoWgayckxYQmtnWqa/CI05M=
SNK_INIT:
secure: i+0xK/acnRfh2XY8FjUR9LPlbP+HyPadahLxlrQnB58=
init:
- ps: $Env:LABEL = "CI" + $Env:APPVEYOR_BUILD_NUMBER.PadLeft(5, "0")
assembly_info:
patch: true
file: AssemblyInfo.cs
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
install:
- cd %APPVEYOR_BUILD_FOLDER%
- git submodule update --init --recursive
before_build:
- appveyor-retry dotnet restore -v Minimal
- ps: |
if ($Env:SNK_PASSPHRASE -ne $null)
{
Write-Host "Using private strong-name key for assembly signing." -ForegroundColor Yellow
C:\projects\jmespath-net\bin\EncryptDecryptFile.PS1
}
else
{
$Env:CONFIGURATION="Debug"
}
build_script:
- ps: C:\projects\jmespath-net\bin\update-version.ps1 -Version $Env:APPVEYOR_BUILD_VERSION
- ps: dotnet build "src\jmespath.net" /p:BuildInParallel=false -c $Env:CONFIGURATION --version-suffix $Env:LABEL
- ps: |
dotnet run --project tools\jmespathnet.compliance\ -- -t tools\jmespathnet.compliance\regression
dotnet run --project tools\jmespathnet.compliance\ -- -t tools\jmespathnet.compliance\jmespath.test\tests
Set-Content `
-Path compliance-2016-09-05-9e8d0e3.json `
-Value ( dotnet run --project tools\jmespathnet.compliance\ -- -t tools\jmespathnet.compliance\jmespath.test\tests -o json ) `
-Encoding UTF8
test_script:
- ps: dotnet test "tests\jmespathnet.tests" -c $Env:CONFIGURATION
after_test:
- ps: dotnet pack --no-build "src\jmespath.net" -c $Env:CONFIGURATION
- ps: |
$targetPath = "src\jmespath.net.parser\bin\Any CPU\$Env:CONFIGURATION"
cp "src\jmespath.net.parser\JmesPath.Net.Parser.nuspec" $targetPath
mkdir "$targetPath\lib" | Out-Null
mv "$targetPath\netstandard1.3" "$targetPath\lib\netstandard1.3"
mv "$targetPath\netstandard2.1" "$targetPath\lib\netstandard2.1"
mv "$targetPath\net45" "$targetPath\lib\net45"
cd $targetPath
nuget pack
artifacts:
- path: '**\*.nupkg'
name: NuGet package
- path: compliance-2016-09-05-9e8d0e3.json
name: Compliance report
deploy:
- provider: NuGet
api_key:
secure: ZlBnIg2jLEMruoEvphERga3nhHa1gzlxOTXAm9knh1LLYRJLgpvBnqO69wPR3lae
skip_symbols: true
artifact: /.*\.nupkg/
on:
branch: master # only release from master branch
APPVEYOR_REPO_TAG: true # only release on new tag
- provider: GitHub
release: v$(APPVEYOR_BUILD_VERSION)
auth_token:
secure: ZlBnIg2jLEMruoEvphERga3nhHa1gzlxOTXAm9knh1LLYRJLgpvBnqO69wPR3lae
draft: true
artifact: /.*\.(nupkg|json)/
on:
branch: master # only release from master branch
APPVEYOR_REPO_TAG: true # only release on new tag
cache:
- '%USERPROFILE%\.nuget\packages'
on_finish: []