-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathappveyor.yml
69 lines (69 loc) · 3.28 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
version: 1.0.{build}
configuration: Release
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
skip_commits:
message: /\[AssemblyVersion AutoUpdate\]/
environment:
COVERALLS_REPO_TOKEN:
secure: asdq09BSCMt4t3OQ4FlIy3p40i0oSYizoJMrdxx6TXaffykL7+vWgzpTbNHls+xZ
GITHUB_ACCESS_TOKEN:
secure: bmd3VXFi5vf+gUn96rmWpE3NtP8Cvdf3BhWcOe/cUH+MXrP+M66NSKsQH8NTPl+a
nuget:
project_feed: true
before_build:
- dotnet restore Pluralize.NET.sln
- nuget install coveralls.net -Version 0.7.0 -OutputDirectory coveralls
build_script:
- cmd: dotnet build Pluralize.NET.sln --configuration Release /p:DebugType=None & dotnet pack Pluralize.NET -o NuGetPackgeOutPut
test_script:
- ps: |
$coveralls = "./coveralls/coveralls.net.0.7.0/tools/csmacnz.coveralls.exe"
dotnet test Pluralize.NET.Tests /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Threshold=80 /p:ThresholdType=line /p:Exclude="[NUnit*]*"
if($env:COVERALLS_REPO_TOKEN) {
$uploadCommand = "$coveralls --opencover -i Pluralize.NET.Tests\coverage.xml --repoToken $env:COVERALLS_REPO_TOKEN --useRelativePaths --commitId $env:APPVEYOR_REPO_COMMIT --commitBranch $env:APPVEYOR_REPO_BRANCH --commitAuthor '$env:APPVEYOR_REPO_COMMIT_AUTHOR' --commitEmail $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL --commitMessage '$env:APPVEYOR_REPO_COMMIT_MESSAGE' --jobId $env:APPVEYOR_BUILD_NUMBER --serviceName appveyor"
iex $uploadCommand
}
artifacts:
- path: Pluralize.NET/bin/Release
name: Binaries
- path: Pluralize.NET/NuGetPackgeOutPut/*.nupkg
name: NugetPackageFile
type: NuGetPackage
deploy:
- provider: NuGet
api_key:
secure: DBikXSlWfZJlNeLN+hIF44kg3ssZisSM1rS/AO/30fNYmE72MeGohrvAdx8eMckT
skip_symbols: true
artifact: NugetPackageFile
on:
APPVEYOR_REPO_TAG: true
- provider: GitHub
release: Pluralize.NET v$(appveyor_build_version)
description: Download Binaries.zip file and extract Pluralize.NET.dll file for the desired target platform and add it to Project references.\n\nOR\n\nInstall from NuGet via package manager console by running:\n\n```\nInstall-Package Pluralize.NET -Version $(appveyor_build_version)\n```\nOR\n\nInstall using dotnet CLI by running:\n\n```\ndotnet add package Pluralize.NET --version $(appveyor_build_version)\n```\n\nOR\n\nInstall using Paket CLI by running:\n\n```\npaket add Pluralize.NET --version $(appveyor_build_version)\n```
auth_token:
secure: bmd3VXFi5vf+gUn96rmWpE3NtP8Cvdf3BhWcOe/cUH+MXrP+M66NSKsQH8NTPl+a
artifact: Binaries
force_update: true
tag: v$(appveyor_build_version)
on:
APPVEYOR_REPO_TAG: true
on_success:
- ps: |
if(!$env:GITHUB_ACCESS_TOKEN) {return}
$env:GIT_REDIRECT_STDERR = '2>&1'
git config --global credential.helper store
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GITHUB_ACCESS_TOKEN):[email protected]`n"
git config --global user.email "[email protected]"
git config --global user.name "sarathkcm"
git stash
git checkout $env:APPVEYOR_REPO_BRANCH
git stash pop
git commit -m "[AssemblyVersion AutoUpdate]" Pluralize.NET/Pluralize.NET.csproj
git push