@@ -14,6 +14,7 @@ bool IsTagged = (BuildSystem.AppVeyor.Environment.Repository.Tag.IsTag &&
14
14
! string . IsNullOrWhiteSpace ( BuildSystem . AppVeyor . Environment . Repository . Tag . Name ) ) ;
15
15
bool IsMainGitVersionRepo = StringComparer . OrdinalIgnoreCase . Equals ( "gittools/gitversion" , BuildSystem . AppVeyor . Environment . Repository . Name ) ;
16
16
bool IsPullRequest = BuildSystem . AppVeyor . Environment . PullRequest . IsPullRequest ;
17
+ bool IsMainGitVersionBranch = StringComparer . OrdinalIgnoreCase . Equals ( "master" , BuildSystem . AppVeyor . Environment . Repository . Branch ) ;
17
18
18
19
void Build ( string configuration , string nugetVersion , string semVersion , string version , string preReleaseTag )
19
20
{
@@ -120,6 +121,7 @@ Task("Zip-Files")
120
121
121
122
Task ( "Create-Release-Notes" )
122
123
. IsDependentOn ( "Build" )
124
+ . WithCriteria ( ( ) => IsMainGitVersionRepo && IsMainGitVersionBranch && ! IsPullRequest )
123
125
. Does ( ( ) =>
124
126
{
125
127
var githubToken = EnvironmentVariable ( "GitHubToken" ) ;
@@ -160,8 +162,7 @@ Task("Upload-AppVeyor-Artifacts")
160
162
"NuGetTaskBuild:GitVersionTask." + nugetVersion + ".nupkg" ,
161
163
"GitVersionTfsTaskBuild:gittools.gitversion-" + semVersion + ".vsix" ,
162
164
"GemBuild:" + gem ,
163
- "zip:GitVersion_" + nugetVersion + ".zip" ,
164
- "releaseNotes:releasenotes.md"
165
+ "zip:GitVersion_" + nugetVersion + ".zip"
165
166
} ) ;
166
167
167
168
AppVeyor . UploadArtifact ( "build/NuGetExeBuild/GitVersion.Portable." + nugetVersion + ".nupkg" ) ;
@@ -171,8 +172,15 @@ Task("Upload-AppVeyor-Artifacts")
171
172
AppVeyor . UploadArtifact ( "build/GitVersionTfsTaskBuild/gittools.gitversion-" + semVersion + ".vsix" ) ;
172
173
AppVeyor . UploadArtifact ( "build/GitVersion_" + nugetVersion + ".zip" ) ;
173
174
AppVeyor . UploadArtifact ( "build/GemBuild/" + gem ) ;
174
- AppVeyor . UploadArtifact ( "build/releasenotes.md" ) ;
175
175
AppVeyor . UploadArtifact ( "build/artifacts" ) ;
176
+
177
+ if ( IsMainGitVersionRepo && IsMainGitVersionBranch && ! IsPullRequest )
178
+ {
179
+ if ( FileExists ( "build/releasenotes.md" ) )
180
+ {
181
+ AppVeyor . UploadArtifact ( "build/releasenotes.md" ) ;
182
+ }
183
+ }
176
184
} ) ;
177
185
178
186
0 commit comments