This repository has been archived by the owner on Feb 22, 2020. It is now read-only.
forked from g0t4/aspnet-identity-mongo
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathappveyor.yml
94 lines (89 loc) · 3.77 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
-
branches:
except:
- /feature\/.*/
# https://www.appveyor.com/docs/branches/#build-on-tags-github-gitlab-and-bitbucket-only
skip_tags: true
# version will be overwritten during install step
version: '1.1.{build}'
configuration:
- Release
image: Visual Studio 2017
platform: Any CPU
environment:
# Don't report back to the mothership
DOTNET_CLI_TELEMETRY_OPTOUT: 1
GitHubAccessToken:
secure: oMWZEelU7ZF9Igc9aDPkxxO9PdBrnw0BNwJsatwcDl/2xj0jjEh90O3XohL0JV8/
pull_requests:
do_not_increment_build_number: true
install:
# Update build version
- ps: $CSPROJ = [xml](Get-Content -Raw -Path src\AspNetCore.Identity.DocumentDB\AspNetCore.Identity.DocumentDB.csproj)
- ps: $DotnetVersionPrefix = ${CSPROJ}.Project.PropertyGroup.VersionPrefix
- ps: $IsStableBranch = ${env:APPVEYOR_REPO_BRANCH} -eq "netcore" -and -not ${env:APPVEYOR_PULL_REQUEST_NUMBER}
- ps: $VersionSuffix = (&{If($IsStableBranch) { "" } Else { "-${env:APPVEYOR_REPO_BRANCH}-${env:APPVEYOR_BUILD_NUMBER}" }})
- ps: $VersionSuffixPlain = $VersionSuffix.TrimStart("-")
- ps: $NewBuildVersion = "${DotnetVersionPrefix}" + "$VersionSuffix"
- ps: Update-AppveyorBuild -Version $NewBuildVersion
# Install Cosmos DB Emulator
- wmic product where name="Azure Cosmos DB Emulator" call uninstall
- ps: Start-FileDownload 'https://aka.ms/cosmosdb-emulator' -FileName 'C:\CosmosDB.Emulator.msi'
- msiexec.exe /i C:\CosmosDB.Emulator.msi /quiet /qn /log install.log
- ps: Get-Content install.log
- ps: >-
& "${env:ProgramFiles}\Azure Cosmos DB Emulator\CosmosDB.Emulator.exe"
before_build:
- ps: >-
appveyor-retry dotnet restore -v Minimal
echo "Building ${env:CONFIGURATION}: build ${env:APPVEYOR_BUILD_NUMBER}"
build_script:
- ps: $OptionalArguments = @{ }
- ps: (&{If($VersionSuffixPlain -ne "") { $OptionalArguments.add("-version-suffix", $VersionSuffixPlain) }})
- ps: dotnet build "src\AspNetCore.Identity.DocumentDB\AspNetCore.Identity.DocumentDB.csproj" -c ${env:CONFIGURATION} @OptionalArguments
test_script:
- ps: dotnet test "test\CoreTests\CoreTests.csproj" -c ${env:CONFIGURATION}
- ps: dotnet test "test\CoreIntegrationTests\CoreIntegrationTests.csproj" -c ${env:CONFIGURATION}
after_test:
- ps: dotnet pack "src\AspNetCore.Identity.DocumentDB" -c ${env:CONFIGURATION} -o artifacts @OptionalArguments
artifacts:
- path: '**\artifacts\**\*.nupkg'
before_deploy:
# https://www.appveyor.com/docs/how-to/git-push/
- ps: git config --global credential.helper store
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GitHubAccessToken):[email protected]`n"
- ps: git config --global user.email "[email protected]"
- ps: git config --global user.name "AppVeyor"
- ps: git tag "v${env:APPVEYOR_BUILD_VERSION}" -a -m "[skip ci] Generated tag from AppVeyor from build ${env:APPVEYOR_BUILD_VERSION}"
- ps: git push --tags --porcelain
deploy:
# https://www.appveyor.com/docs/deployment/github/
- provider: GitHub
release: v$(appveyor_build_version)
description: ''
auth_token:
secure: oMWZEelU7ZF9Igc9aDPkxxO9PdBrnw0BNwJsatwcDl/2xj0jjEh90O3XohL0JV8/
artifact: /.*\.nupkg/
draft: true
prerelease: true
on:
branch: master
# https://www.appveyor.com/docs/deployment/github/
- provider: GitHub
release: v$(appveyor_build_version)
description: ''
auth_token:
secure: oMWZEelU7ZF9Igc9aDPkxxO9PdBrnw0BNwJsatwcDl/2xj0jjEh90O3XohL0JV8/
artifact: /.*\.nupkg/
draft: true
prerelease: true
on:
branch: netcore
# https://www.appveyor.com/docs/deployment/nuget/
- provider: NuGet
api_key:
secure: Ly8WTNgKxUZk71feAET7pc+bG4by7GyMvbhjvZa64zkSq6mzQM8vCTJw3SyyFJGh
skip_symbols: false
artifact: /.*\.nupkg/
on:
branch: netcore