-
Notifications
You must be signed in to change notification settings - Fork 155
/
appveyor.yml
48 lines (48 loc) · 1.86 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
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
install:
- ps: |
Invoke-WebRequest -Uri 'https://dot.net/v1/dotnet-install.ps1' -UseBasicParsing -OutFile "$env:temp\dotnet-install.ps1"
& $env:temp\dotnet-install.ps1 -Architecture x64 -Version '9.0.100' -InstallDir "$env:ProgramFiles\dotnet"
before_build:
- dotnet restore csharp -s https://api.nuget.org/v3/index.json
- 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:
- dotnet test csharp/PhoneNumbers.sln --configuration Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
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: qdulZRWZPhNV5eC6KUEy3pmgGQX/Do+iKX8w0gf56faN0JobhsCnLKC6jOnZaqsY