diff --git a/.ci/azure-build.yml b/.ci/azure-build.yml index 06d40b97..e4a0b898 100644 --- a/.ci/azure-build.yml +++ b/.ci/azure-build.yml @@ -23,7 +23,9 @@ steps: #overWrite: false # Optional #flattenFolders: false # Optional # 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' } +# delete the release if it already exists to avoid an error - task: GitHubRelease@0 condition: and(succeeded(), eq(variables['buildSuccess'], 'true') ) inputs: @@ -43,7 +45,7 @@ steps: #isPreRelease: true # Optional #addChangeLog: true # Optional - task: GitHubRelease@0 - condition: succeeded() + condition: and(succeeded(), eq(variables['buildSuccess'], 'true') ) inputs: gitHubConnection: nheko-reborn-pipeline repositoryName: '$(Build.Repository.Name)'