117 lines
3.8 KiB
YAML
117 lines
3.8 KiB
YAML
# Builds Betaflight Configurator on Windows, Linux and OSX platforms.
|
|
#
|
|
# After building, artifacts are released to a seperate repository.
|
|
#
|
|
# Azure Pipelines requires the following extensions to be installed:
|
|
# - GitHub Tool: https://marketplace.visualstudio.com/items?itemName=marcelo-formentao.github-tools
|
|
#
|
|
# You'll also need to setup the follwing pipeline variables:
|
|
# "releaseNotes" - This is used to add the release notes in the windows job in the build stage so they can be published as part of the github release in the release stage
|
|
# "endpoint" - The name of the github endpoint link setup in AzDo - setup when linking AzDo and GitHub
|
|
# "owner" - The owner of the repository to release to e.g. betaflight
|
|
# "repoName" - The name of the repository to release to e.g. betaflight-configurator-nightly
|
|
|
|
trigger:
|
|
- master
|
|
|
|
stages:
|
|
- stage: Build
|
|
jobs:
|
|
|
|
- job: 'Windows'
|
|
pool:
|
|
vmImage: 'vs2017-win2016'
|
|
|
|
steps:
|
|
- task: UseNode@1
|
|
inputs:
|
|
version: '10.16.3'
|
|
displayName: 'Install Node.js 10.16.3'
|
|
- script: yarn install
|
|
displayName: 'Run yarn install'
|
|
- script: yarn release --win32
|
|
displayName: 'Run gulp release'
|
|
- powershell: Set-Content -Path '$(System.DefaultWorkingDirectory)/release/log.txt' -Value $env:BUILD_SOURCEVERSIONMESSAGE
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
displayName: 'Publish Windows release'
|
|
inputs:
|
|
targetPath: '$(System.DefaultWorkingDirectory)/release'
|
|
artifact: 'betaflight-configurator-windows'
|
|
|
|
- job: 'MacOS'
|
|
pool:
|
|
vmImage: 'macos-10.13'
|
|
|
|
steps:
|
|
- task: UseNode@1
|
|
inputs:
|
|
version: '10.16.3'
|
|
displayName: 'Install Node.js 10.16.3'
|
|
- script: npm install -g gulp
|
|
displayName: 'Install Gulp'
|
|
- script: yarn install
|
|
displayName: 'Run yarn install'
|
|
- script: yarn gulp release --osx64
|
|
displayName: 'Run release'
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
displayName: 'Publish MacOS release'
|
|
inputs:
|
|
artifactName: betaflight-configurator-macos
|
|
targetPath: '$(System.DefaultWorkingDirectory)/release'
|
|
|
|
- job: 'Linux'
|
|
pool:
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
steps:
|
|
- task: UseNode@1
|
|
inputs:
|
|
version: '10.16.3'
|
|
displayName: 'Install Node.js 10.16.3'
|
|
- script: yarn install
|
|
displayName: 'Run yarn install'
|
|
- script: yarn release --linux64
|
|
displayName: 'Run gulp release'
|
|
- script: cd $(System.DefaultWorkingDirectory)/release; find -mindepth 1 -maxdepth 1 -type d -exec rm -r {} \;
|
|
displayName: 'Clean release folders'
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
displayName: 'Publish Linux release'
|
|
inputs:
|
|
artifactName: betaflight-configurator-linux
|
|
targetPath: '$(System.DefaultWorkingDirectory)/release'
|
|
|
|
|
|
- stage: Release
|
|
jobs:
|
|
- job: Release
|
|
|
|
steps:
|
|
- task: DownloadPipelineArtifact@2
|
|
inputs:
|
|
buildType: 'current'
|
|
targetPath: '$(Pipeline.Workspace)'
|
|
- powershell: Write-Output ("##vso[task.setvariable variable=releaseNotes;]$(gc $(Pipeline.Workspace)/betaflight-configurator-windows/log.txt)")
|
|
|
|
- task: GitHubReleasePublish@1
|
|
inputs:
|
|
githubEndpoint: '$(endpoint)'
|
|
manuallySetRepository: true
|
|
githubOwner: '$(owner)'
|
|
githubRepositoryName: '$(repoName)'
|
|
githubReleaseNotes: '$(releaseNotes)'
|
|
githubReleaseDraft: false
|
|
githubReleasePrerelease: false
|
|
githubIgnoreAssets: false
|
|
githubReleaseAsset: |
|
|
$(Pipeline.Workspace)/betaflight-configurator-windows/**
|
|
$(Pipeline.Workspace)/betaflight-configurator-macos/**
|
|
$(Pipeline.Workspace)/betaflight-configurator-linux/**
|
|
githubReuseRelease: true
|
|
githubReuseDraftOnly: true
|
|
githubSkipDuplicatedAssets: false
|
|
githubEditRelease: false
|
|
githubDeleteEmptyTag: false
|