azure-pipelines-dist.yml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Docs see here:
  2. # https://aka.ms/yaml
  3. jobs:
  4. - job: 'dist_debian'
  5. displayName: 'Dist (debian)'
  6. pool:
  7. vmImage: 'ubuntu-18.04'
  8. steps:
  9. - checkout: self
  10. submodules: recursive
  11. - task: Bash@3
  12. inputs:
  13. targetType: FilePath
  14. filePath: ./tools/azure-devops/debian/install.sh
  15. failOnStderr: false
  16. displayName: Installing required packages
  17. - task: Bash@3
  18. inputs:
  19. targetType: FilePath
  20. filePath: ./tools/azure-devops/debian/build.sh
  21. failOnStderr: false
  22. displayName: Building & Testing
  23. - task: PublishBuildArtifacts@1
  24. inputs:
  25. PathtoPublish: '$(Build.ArtifactStagingDirectory)'
  26. ArtifactName: libopen62541-debian
  27. # publishing artifacts from PRs from a fork is currently blocked
  28. condition: succeeded()
  29. displayName: "Publish Artifact: open62541 Debian Packages"
  30. # See https://github.com/microsoft/azure-pipelines-tasks/issues/11260#issuecomment-527343172
  31. - bash: echo "##vso[task.setvariable variable=TAG]${BUILD_SOURCEBRANCH##refs/tags/}"
  32. displayName: Set TAG variable for $(Build.SourceBranch)
  33. condition: startswith(variables['Build.SourceBranch'], 'refs/tags/')
  34. - task: GitHubRelease@0
  35. # Only execute this task if a tags build
  36. condition: startswith(variables['Build.SourceBranch'], 'refs/tags/')
  37. inputs:
  38. gitHubConnection: 'open62541-azure-bot'
  39. repositoryName: '$(Build.Repository.Name)'
  40. action: 'edit' # Options: create, edit, delete
  41. target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit
  42. tagSource: 'Git tag'
  43. #tagPattern: # Optional
  44. tag: $(TAG) # Required when action == Edit || Action == Delete || TagSource == Manual
  45. #title: # Optional
  46. #releaseNotesSource: 'file' # Optional. Options: file, input
  47. #releaseNotesFile: # Optional
  48. #releaseNotes: # Optional
  49. assets: '$(Build.ArtifactStagingDirectory)/*' # Optional
  50. assetUploadMode: 'replace' # Optional. Options: delete, replace
  51. #isDraft: false # Optional
  52. #isPreRelease: false # Optional
  53. addChangeLog: false # Optional
  54. #compareWith: 'lastFullRelease' # Required when addChangeLog == True. Options: lastFullRelease, lastRelease, lastReleaseByTag
  55. #releaseTag: # Required when compareWith == LastReleaseByTag