-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
56 lines (54 loc) · 2.09 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
version: Build-{build}
image: Visual Studio 2017
build_script:
- cmd: dotnet build %APPVEYOR_BUILD_FOLDER%/src /p:Configuration=%buildConfig%;VersionSuffix=%suffix%
skip_commits:
files:
- docs/*
- readme.md
- appveyor.yml
- .gitignore
- .gitmodules
branches:
only:
- develop
- master
environment:
nugetScriptsFolder: .\dotnet-versioning-scripts\NuGet
versioningScriptsFolder: .\dotnet-versioning-scripts\dotnet-versioning
packageName: Autofac.BindingByConvention
csprojPath: .\src\Autofac.BindingByConvention\Autofac.BindingByConvention.csproj
repoNuGet: https://www.nuget.org/api/v2
repoNuGetPackage: $(repoNuGet)/package
buildConfig: Release
install:
- git submodule update --init --recursive
before_build:
- dotnet restore "./src/Autofac.BindingByConvention.sln"
- cmd: powershell %versioningScriptsFolder%/define-version-variables-appveyor.ps1 %csprojPath% %versioningScriptsFolder% %packageName% %APPVEYOR_REPO_BRANCH%
after_build:
- cmd: powershell %nugetScriptsFolder%/dotnet-pack-optionalsuffix.ps1 ./src %buildConfig% "%APPVEYOR_BUILD_FOLDER%/artifacts" %suffix%
artifacts:
- path: ./artifacts/Autofac.BindingByConvention.*.nupkg
name: NuGet_pkg
deploy:
- provider: NuGet
server: $(repoNuGetPackage)
artifact: NuGet_pkg
api_key:
secure: uBphca4OZ4WuDCPtfgBWnGvqvQOirDAq+ErQubkiMwUBVnKfETzoMxsNS/ofyTZJ
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.