Try to resolve release deletion issue

This commit is contained in:
Joseph Donofry 2019-05-18 10:56:57 -04:00
parent bd5ac771e4
commit c1dc1e0f9d
No known key found for this signature in database
GPG key ID: E8A1D78EF044B0CB

View file

@ -23,7 +23,9 @@ steps:
#overWrite: false # Optional #overWrite: false # Optional
#flattenFolders: false # Optional #flattenFolders: false # Optional
# Create a variable for build success # Create a variable for build success
- bash: ls ${BUILD.ARTIFACTSTAGINGDIRECTORY}
- pwsh: if( (Get-ChildItem $(Build.ArtifactStagingDirectory) | Measure-Object).Count -eq 0) { echo '##vso[task.setvariable variable=buildSuccess]false' } else { echo '##vso[task.setvariable variable=buildSuccess]true' } - pwsh: if( (Get-ChildItem $(Build.ArtifactStagingDirectory) | Measure-Object).Count -eq 0) { echo '##vso[task.setvariable variable=buildSuccess]false' } else { echo '##vso[task.setvariable variable=buildSuccess]true' }
# delete the release if it already exists to avoid an error
- task: GitHubRelease@0 - task: GitHubRelease@0
condition: and(succeeded(), eq(variables['buildSuccess'], 'true') ) condition: and(succeeded(), eq(variables['buildSuccess'], 'true') )
inputs: inputs:
@ -43,7 +45,7 @@ steps:
#isPreRelease: true # Optional #isPreRelease: true # Optional
#addChangeLog: true # Optional #addChangeLog: true # Optional
- task: GitHubRelease@0 - task: GitHubRelease@0
condition: succeeded() condition: and(succeeded(), eq(variables['buildSuccess'], 'true') )
inputs: inputs:
gitHubConnection: nheko-reborn-pipeline gitHubConnection: nheko-reborn-pipeline
repositoryName: '$(Build.Repository.Name)' repositoryName: '$(Build.Repository.Name)'