daml/azure-pipelines.yml
2019-04-15 13:54:04 +01:00

91 lines
2.7 KiB
YAML

# Azure Pipelines file, see https://aka.ms/yaml
# Enable builds on all branches
trigger:
# Build every commit as our release process relies on
# the release process being built alone.
batch: false
branches:
include:
- master
# Enable PR triggers that target the master branch
pr:
autoCancel: true # cancel previous builds on push
branches:
include:
- master
jobs:
- job: linux
timeoutInMinutes: 360
pool:
${{ if eq(variables['System.PullRequest.IsFork'], 'true') }}:
vmImage: 'ubuntu-16.04'
${{ if eq(variables['System.PullRequest.IsFork'], 'false') }}:
name: 'linux-pool'
steps:
- template: ci/build-unix.yml
parameters:
name: linux
- job: macos
timeoutInMinutes: 360
pool:
vmImage: 'macOS-10.13'
steps:
- template: ci/build-unix.yml
parameters:
name: macos
- job: windows
timeoutInMinutes: 360
pool:
vmImage: 'vs2017-win2016'
steps:
- template: ci/build-windows.yml
- job: release
dependsOn: [ "Linux", "macOS", "Windows"]
pool:
vmImage: "Ubuntu-16.04"
condition: and(succeeded(),
eq( dependencies.linux.outputs['release.has_released'], 'true' ),
eq( dependencies.macos.outputs['release.has_released'], 'true' ))
#eq( dependencies.windows.outputs['release.has_released'], 'true' ))
variables:
artifact-linux: $[ dependencies.linux.outputs['publish.artifact'] ]
artifact-macos: $[ dependencies.macos.outputs['publish.artifact'] ]
#artifact-windows: $[ dependencies.windows.outputs['publish.artifact'] ]
steps:
- checkout: self
persistCredentials: true
- bash: |
set -euxo pipefail
git tag v$(cat VERSION)
git push origin v$(cat VERSION)
mkdir $(Build.StagingDirectory)/release
- task: DownloadPipelineArtifact@0
inputs:
artifact-name: $(artifact-linux)
targetPath: $(Build.StagingDirectory)/release
- task: DownloadPipelineArtifact@0
inputs:
artifact-name: $(artifact-macos)
targetPath: $(Build.StagingDirectory)/release
#- task: DownloadPipelineArtifact@0
# inputs:
# artifact-name: $(artifact-windows)
# targetPath: $(Build.StagingDirectory)/release
- task: GitHubRelease@0
inputs:
gitHubConnection: 'garyverhaegen-da'
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'auto'
assets: $(Build.StagingDirectory)/release/*
assetUploadMode: 'replace'
addChangeLog: false
isPrerelease: true