7272 msbuildArgs : ' /p:PublicRelease=true'
7373 configuration : ' $(buildConfiguration)'
7474
75- - powershell : |
76- # get subject and commit message for commit
77- $commitMessage = git log --format='%B' -1
78-
79- # need to flatten message by removing new lines
80- $commitMessage = $commitMessage -replace "`r`n", " "
81-
82- if($commitMessage -like "*PUBLISH_RELEASE*")
83- {
84- # set variable
85- Write-Host "$("##vso[task.setvariable variable=RELEASE_DRAFT;isOutput=true]")False"
86- Write-Host "$("##vso[task.setvariable variable=RELEASE_VERSION;isOutput=true]")True"
87- Write-Host "Release draft: FALSE"
88- }
89- else
90- {
91- # set variable
92- Write-Host "$("##vso[task.setvariable variable=RELEASE_DRAFT;isOutput=true]")True"
93- Write-Host "$("##vso[task.setvariable variable=RELEASE_VERSION;isOutput=true]")False"
94- Write-Host "Release draft: TRUE"
95- }
96- name: SetReleaseDraftVar
97- condition: succeeded()
98- displayName: Set release draft var
99-
10075 - task : CopyFiles@1
10176 inputs :
10277 sourceFolder : $(Build.SourcesDirectory)
@@ -149,7 +124,7 @@ jobs:
149124 packagesToPush : ' $(Build.ArtifactStagingDirectory)/*.nupkg'
150125 publishFeedCredentials : ' AzureArtifacts'
151126 continueOnError : true
152- condition : and( succeeded(), ne(variables['system.pullrequest.isfork '], true ) )
127+ condition : and( succeeded(), ne(variables['Build.Reason '], 'PullRequest' ) )
153128 displayName : Push NuGet packages to Azure Artifacts
154129
155130 # update dependencies
@@ -172,13 +147,13 @@ jobs:
172147 githubReleaseTitle : ' nanoFramework Metadata Processor v$(GitBuildVersionSimple)'
173148 githubReleaseNotes : ' add description here'
174149 githubTargetCommitsh : $(Build.SourceVersion)
175- githubReleaseDraft : $(RELEASE_DRAFT)
150+ githubReleaseDraft : false
176151 githubReleasePrerelease : false
177152 githubReuseDraftOnly : true
178153 githubReuseRelease : true
179154 githubEditRelease : true
180155 githubReleaseAsset : ' $(Build.ArtifactStagingDirectory)/*.exe'
181- condition : and( succeeded(), not( startsWith( variables['Build.SourceBranch '], 'refs/pull') ), not( startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) )
156+ condition : and( succeeded(), ne( variables['Build.Reason '], 'PullRequest' ), not( startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) )
182157 displayName : Create/Update GitHub release
183158
184159# #################################
0 commit comments