-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathappveyor.yml
More file actions
55 lines (55 loc) · 1.95 KB
/
appveyor.yml
File metadata and controls
55 lines (55 loc) · 1.95 KB
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
version: Build {build}
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
- /release-.+/
environment:
matrix:
- job_name: Linux test
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2204
- job_name: Windows build and test
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
configuration: Release
matrix:
fast_finish: true
cache:
- '%USERPROFILE%\.nuget\packages -> **\*.csproj'
- '$HOME/.nuget/packages -> **/*.csproj'
for:
- matrix:
only:
- job_name: Windows build and test
environment:
MYGET_API_KEY:
secure: tRrj53sW6hpLkOYP9U4PJU9J/EQ2OmNCWrWgZhZ/eF6+DMoY+Ed/GUhG5P8lr8rV
before_build:
- ps: msbuild /t:restore /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
build:
verbosity: minimal
after_build:
- ps: msbuild /t:pack /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
artifacts:
- path: '**/*.nupkg'
- path: '**/*.snupkg'
deploy_script:
- ps: |
$nupkgs = Get-ChildItem -Path . -Filter '*.nupkg' -Recurse
foreach ($nupkg in $nupkgs) {
Write-Host "Pushing package: $($nupkg.FullName)"
nuget push $nupkg.FullName -Source https://www.myget.org/F/zhaobang-ftpserver-nightly/api/v3/index.json -ApiKey $env:MYGET_API_KEY -SkipDuplicate
if ($LASTEXITCODE -ne 0) {
throw ("nuget exited with code " + $LASTEXITCODE)
}
}
- matrix:
only:
- job_name: Linux test
build_script:
- dotnet build --configuration Release --tl:off -logger:"/opt/appveyor/build-agent/msbuild-logger/Appveyor.MSBuildLogger.dll"
test_script:
- dotnet test --configuration Release --no-build --tl:off --logger "trx;LogFileName=test_results.trx" -logger:"/opt/appveyor/build-agent/msbuild-logger/Appveyor.MSBuildLogger.dll"
after_test:
- sh: |
curl -F "file=@Zhaobang.FtpServer.Tests/TestResults/test_results.trx" "https://ci.appveyor.com/api/testresults/mstest/$APPVEYOR_JOB_ID"