|
|
|
@ -31,7 +31,9 @@ steps: |
|
|
|
|
- bash: ls ${ARTIFACT_STAGING_DIRECTORY} |
|
|
|
|
env: |
|
|
|
|
ARTIFACT_STAGING_DIRECTORY: $(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 $ENV:ARTIFACT_STAGING_DIRECTORY | Measure-Object).Count -eq 0) { echo '##vso[task.setvariable variable=buildSuccess]false' } else { echo '##vso[task.setvariable variable=buildSuccess]true' } |
|
|
|
|
env: |
|
|
|
|
ARTIFACT_STAGING_DIRECTORY: $(Build.ArtifactStagingDirectory)) |
|
|
|
|
# delete the release if it already exists to avoid an error |
|
|
|
|
- task: GitHubRelease@0 |
|
|
|
|
condition: and(succeeded(), eq(variables['buildSuccess'], 'true') ) |
|
|
|
|