File tree Expand file tree Collapse file tree 1 file changed +74
-0
lines changed Expand file tree Collapse file tree 1 file changed +74
-0
lines changed Original file line number Diff line number Diff line change
1
+ version : 1.0.{build}
2
+ configuration : Release
3
+ image :
4
+ - Visual Studio 2017
5
+ environment :
6
+ GitHubOrganisation : TestStack
7
+ GitHubToken :
8
+ secure : cBxvAtTgSlWVblTXtx8QKygh2HQeYZ9i0plMjJzCTNInGCm1XyG+nrSs18qUtC8W
9
+ init :
10
+ - ps : iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
11
+ before_build :
12
+ - ps : >-
13
+ nuget restore
14
+
15
+ choco install -y --no-progress git.install GitReleaseManager.Portable
16
+
17
+ npm install github-release-notes -g
18
+
19
+ GitVersion /output buildserver /updateassemblyinfo
20
+
21
+ If (Test-Path ".\PreBuild.ps1") {
22
+
23
+ & ".\PreBuild.ps1"
24
+
25
+ }
26
+
27
+ build :
28
+ parallel : true
29
+ verbosity : minimal
30
+ after_build :
31
+ - ps : >-
32
+ Get-ChildItem -Recurse *.nuspec | foreach { nuget pack $_.FullName -Properties "Configuration=Release;Platform=AnyCPU" -Symbols -Version $Env:GitVersion_NuGetVersion }
33
+
34
+ $currentTag = git tag -l --points-at HEAD
35
+
36
+ $HTTP_Request = [System.Net.WebRequest]::Create("https://api.github.com/repos/$env:GitHubOrganisation/$env:APPVEYOR_PROJECT_NAME/releases/tags/$Env:GitVersion_NuGetVersion")
37
+
38
+ $HTTP_Request.UserAgent = "Powershell"
39
+
40
+ try {
41
+
42
+ $HTTP_Request.GetResponse()
43
+
44
+ } catch [Net.WebException] {
45
+
46
+ [System.Net.HttpWebResponse] $resp = [System.Net.HttpWebResponse] $_.Exception.Response
47
+
48
+ if ($currentTag -And $resp.StatusCode -eq 404) {
49
+
50
+ $env:SHOULD_DEPLOY = 'true'
51
+
52
+ }
53
+
54
+ }
55
+ test :
56
+ assemblies :
57
+ only :
58
+ - ' **\*.*Tests.dll'
59
+ artifacts :
60
+ - path : ' *.nupkg'
61
+ deploy :
62
+ - provider : NuGet
63
+ api_key :
64
+ secure : E55iN0yXlOk+HFXJ8SJ3XVLkJk27d1Hef98SJeg+zeHYXjMANmS+ZE1LuwNEk9Nv
65
+ on :
66
+ SHOULD_DEPLOY : true
67
+ after_deploy :
68
+ - ps : >-
69
+ gren release --token=$env:GitHubToken
70
+ notifications :
71
+ - provider : GitHubPullRequest
72
+ on_build_success : true
73
+ on_build_failure : true
74
+ on_build_status_changed : false
You can’t perform that action at this time.
0 commit comments