forked from twcclegg/libphonenumber-csharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
47 lines (47 loc) · 1.78 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
init:
- ps: >-
if ($env:APPVEYOR_SCHEDULED_BUILD -eq "true")
{
Exit
}
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_TAG_NAME.substring(1))"
}
else
{
Update-AppveyorBuild -Version "$(((nuget list libphonenumber-csharp -Source https://api.nuget.org/v3/index.json | findstr "libphonenumber-csharp[^.-]") -split ' ')[1])-$($env:APPVEYOR_REPO_COMMIT.substring(0,7))"
}
image: Visual Studio 2022
configuration: Release
environment:
COVERALLS_REPO_TOKEN:
secure: vncyomjYijKQKcbLpvs7DFLyNWPjW7tk9KNF/bTV5J/RxOnFydZfsJSsp7SMlvUg
pull_requests:
do_not_increment_build_number: true
branches:
only:
- main
before_build:
- dotnet restore csharp -s https://api.nuget.org/v3/index.json
- choco install opencover.portable
- choco install codecov
- ps: Compress-Archive -Path "resources\geocoding\*" -DestinationPath "resources\geocoding.zip"
- ps: Compress-Archive -Path "resources\test\geocoding\*" -DestinationPath "resources\test\testgeocoding.zip"
build_script:
- dotnet pack -c Release csharp\PhoneNumbers
- dotnet pack -c Release csharp\PhoneNumbers.Extensions
test_script:
- OpenCover.Console.exe -register:user -target:dotnet.exe -targetargs:"test csharp\PhoneNumbers.sln" -filter:"+[PhoneNumbers]* -[PhoneNumbers.Test]*" -excludebyattribute:*.CompilerGenerated*^ -oldStyle -returntargetcode
- codecov -f results.xml
artifacts:
- path: csharp\PhoneNumbers\bin\Release\libphonenumber-csharp.*
- path: csharp\PhoneNumbers.Extensions\bin\Release\libphonenumber-csharp.extensions.*
nuget:
account_feed: true
deploy:
- provider: NuGet
on:
appveyor_repo_tag: true
api_key:
secure: 0WWQO36GLvorsliSGmbtY0/4u5qgyP2MYKn0CrTlSo3FIOZsNSMKtvc3r1GAqgnt