/
.appveyor.yml
58 lines (54 loc) · 2 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
version: '{build}'
clone_script:
- cmd: >-
git clone -q --branch=%APPVEYOR_REPO_BRANCH% https://github.com/%APPVEYOR_REPO_NAME%.git %APPVEYOR_BUILD_FOLDER%
&& cd %APPVEYOR_BUILD_FOLDER%
&& git checkout -qf %APPVEYOR_REPO_COMMIT%
&& git submodule update --init --recursive
pull_requests:
do_not_increment_build_number: true
nuget:
disable_publish_on_pr: true
before_build:
- dotnet restore
build_script:
- dotnet build --no-restore -c Release
- ps: |
$versionTag = git describe --abbrev=0 --exact-match 2>&1 # powershell can't capture native errors from git
if ($versionTag -match 'fatal: no tag exactly matches')
{
$versionTag = $null
}
$latestVersionTag = git describe --abbrev=0
$devVersion = "$($latestVersionTag)-dev$($Env:APPVEYOR_BUILD_VERSION)"
$pathExtractor = [regex]::new("Successfully created package .(?<PackagePath>[^']+)'")
$devMessage = nuget pack -properties version=$devVersion
$devPath = $pathExtractor.Match($devMessage).Groups['PackagePath'].Value
Push-AppveyorArtifact $devPath -DeploymentName devPackage -Type NuGetPackage
if ($versionTag -ne $null)
{
$releaseMessage = nuget pack -properties version=$versionTag
$releasePath = $pathExtractor.Match($releaseMessage).Groups['PackagePath'].Value
Push-AppveyorArtifact $releasePath -DeploymentName releasePackage -Type NuGetPackage
}
test_script:
- ps: |
cd NoAsyncActions.Test
dotnet test --no-restore -c Release
cd ../
deploy:
- provider: NuGet
name: releaseOnNuget
api_key:
secure: cMXDyTieSqQcDjJ/RgNTr1vOHdNrnS37rSvTlJDsP0JsfJji+IRQq1PJDmQYpkq/
skip_symbols: false
artifact: releasePackage
on:
appveyor_repo_tag: true
- provider: NuGet
name: nightlyOnMyGet
server: https://www.myget.org/F/noasyncactions/api/v2/package
api_key:
secure: +aO0ePYYFWEGCTwQJXDKZcMIe2bdo5p3cK4dUimdwomjIw64FmY+R0jinUOIAShQ
skip_symbols: false
artifact: devPackage