-
Notifications
You must be signed in to change notification settings - Fork 6
/
appveyor.yml
48 lines (43 loc) · 1.93 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
version: 1.0.{build}
pull_requests:
do_not_increment_build_number: true
skip_tags: true
image: Visual Studio 2017
configuration: Release
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
environment:
git_access_token:
secure: V8i7UZRY6IQFpngUi2sgnunCFZKvE4al96flaBKyWqXyRLmTabX0/1Z0Tpl8BWKr
nuget_api_key:
secure: OuKd332iG0hMgbOQvO4rCvMOtySWRH6rz9vuih81zdsOZFSkjxXx7tlbq8K/6gJK
nuget:
account_feed: true
disable_publish_on_pr: true
before_build:
- cmd: nuget restore
build:
publish_nuget: true
verbosity: minimal
before_package:
- ps: "git fetch --tags\n$tags = git tag -l v*\nif ($tags)\n{\n $releaseNotes = git log \"$(git describe --tags --match v* --abbrev=0)..$($env:APPVEYOR_REPO_COMMIT)\" --pretty=format:\"-%s\" --no-merges\n} \nelse\n{\n $releaseNotes = git log $($env:APPVEYOR_REPO_COMMIT) --pretty=format:\"-%s\" --no-merges\n}\n\n$releaseNotesAsString = if ($releaseNotes -eq $null) { \"\" } else { [string]::join(\"`n\", $releaseNotes) }\n\nWrite-Host \"Release notes: '$($releaseNotesAsString)'\"\n\n$path = \"src/OpenTracing.Confluent.Kafka/OpenTracing.Confluent.Kafka.csproj\"\n[xml]$xml = Get-Content -Path $path\n$xml.GetElementsByTagName(\"PackageReleaseNotes\").set_InnerXML(\"$releaseNotesAsString\")\nSet-Content $path -Value $xml.InnerXml -Force"
deploy:
- provider: NuGet
api_key:
secure: W6SXqw8kP6Ivhxzi3UHzUHJPC4Cc0AOcdwfplsbs0Gg=
on:
branch: master
after_deploy:
- ps: >-
git config --global credential.helper store
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:git_access_token):[email protected]`n"
git config --global user.email "[email protected]"
git config --global user.name "Fredrik Arvidsson"
git tag v$($env:APPVEYOR_BUILD_VERSION) $($env:APPVEYOR_REPO_COMMIT)
git push origin --tags --quiet