-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathappveyor.yml
53 lines (52 loc) · 2.02 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
version: Build-{build}
image: Visual Studio 2017
build_script:
- cmd: dotnet build %APPVEYOR_BUILD_FOLDER% /p:Configuration=%buildConfig%;VersionSuffix=%suffix%
skip_commits:
files:
- docs/*
- readme.md
branches:
only:
- develop
- master
environment:
ciScriptFolderName: .\dotnet-ci-scripts
nugetScriptsFolder: $(ciScriptFolderName)\NuGet
versioningScriptsFolder: $(ciScriptFolderName)\dotnet-versioning
packageName: MediatR.EventAggregator
csprojPath: .\MediatR.EventAggregator\MediatR.EventAggregator.csproj
repoNuGet: https://www.nuget.org/api/v2
repoNuGetPackage: $(repoNuGet)/package
buildConfig: Release
install:
- git submodule update --init --recursive
before_build:
- dotnet restore "./MediatR.EventAggregator.sln"
- cmd: powershell %versioningScriptsFolder%/define-version-variables-appveyor.ps1 %csprojPath% %versioningScriptsFolder% %packageName% %APPVEYOR_REPO_BRANCH%
after_build:
- cmd: powershell %nugetScriptsFolder%/dotnet-pack-optionalsuffix.ps1 ./ %buildConfig% "%APPVEYOR_BUILD_FOLDER%/artifacts" %suffix%
artifacts:
- path: '**/MediatR.EventAggregator.*.nupkg '
name: NuGet_pkg
deploy:
- provider: NuGet
server: $(repoNuGetPackage)
artifact: NuGet_pkg
api_key:
secure: /EtERPHiFz3on6Ayv41+dptgj/s67aAdqR0QvIOhvd2QOXvTKEbIEkjlyTViYT6O
on:
branch: develop
- provider: NuGet
server: $(repoNuGetPackage)
artifact: NuGet_pkg
api_key:
secure: uBphca4OZ4WuDCPtfgBWnGvqvQOirDAq+ErQubkiMwUBVnKfETzoMxsNS/ofyTZJ
on:
branch: master
# Note on the NuGet deploy provider :
# Nuget takes a few minutes to index the published packages. If two builds are executed in a short time,
# the subsequent packages will be built, but the publication to NuGet will fail, and the build will still be green on AppVeyor.
# In order to fix this, one option would be to fail the build if a package could not be pushed
# because one already exists with the specified version.
# In order to do so, we would need to get rid of the deploy provider, and do it all by hand. It shouldn't be too much work.