-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
29 lines (28 loc) · 1.43 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
version: 1.4.0.{build}
image: Visual Studio 2019
configuration: Release
platform: Any CPU
build_script:
- ps: >-
dotnet add .\src\Tests\Tests.csproj package Appveyor.TestLogger --version 2.0.0
if (${env:APPVEYOR_REPO_TAG} -eq $true) {
$env:semver = $env:APPVEYOR_REPO_TAG_NAME
dotnet build .\src\NHibernate.PersistenceTesting.sln --configuration $env:CONFIGURATION "-p:VersionPrefix=${env:semver}"
dotnet pack .\src\NHibernate.PersistenceTesting\NHibernate.PersistenceTesting.csproj --configuration $env:CONFIGURATION --include-symbols --output ./ "-p:VersionPrefix=${env:semver}"
} else {
$env:semver = $env:APPVEYOR_BUILD_VERSION -ireplace '(\d+.\d+.\d+).(\d+)', "`$1"
$suffix = "ci-${env:APPVEYOR_BUILD_NUMBER}-${env:APPVEYOR_REPO_BRANCH}"
$env:suffix = $suffix.Substring(0, [System.Math]::Min(10, $suffix.Length))
dotnet build .\src\NHibernate.PersistenceTesting.sln --configuration $env:CONFIGURATION "-p:VersionPrefix=${env:semver}" --version-suffix $env:suffix
dotnet pack .\src\NHibernate.PersistenceTesting\NHibernate.PersistenceTesting.csproj --configuration $env:CONFIGURATION --include-symbols --output ./ "-p:VersionPrefix=${env:semver}" --version-suffix $env:suffix
}
test_script:
- ps: >-
dotnet test .\src\Tests\bin\Release\netcoreapp2.1\Tests.dll --logger:Appveyor
artifacts:
- path: '*.nupkg'
deploy:
- provider: Environment
name: NuGet.org
on:
appveyor_repo_tag: true