1 # Builds the Betaflight firmware
3 # After building, artifacts are released to a seperate repository.
5 # Azure Pipelines requires the following extensions to be installed:
6 # - GitHub Tool: https://marketplace.visualstudio.com/items?itemName=marcelo-formentao.github-tools
8 # You'll also need to setup the follwing pipeline variables:
9 # "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
10 # "endpoint" - The name of the github endpoint link setup in AzDo - setup when linking AzDo and GitHub
11 # "owner" - The owner of the repository to release to e.g. betaflight
12 # "repoName" - The name of the repository to release to e.g. betaflight-configurator-nightly
17 repoName: betaflight-pull-requests
18 releaseNotes: This is a build of a community provided pull request. It may be unstable and result in corrupted configurations or data loss. **Use only for testing.**
20 name: $(Build.RequestedFor)_$(Build.SourceBranchName)_$(BuildID)
29 vmImage: 'ubuntu-16.04'
31 - script: make arm_sdk_install
32 displayName: 'Install the build toolchain'
33 - script: make unified
34 displayName: 'Build the Unified Targets'
35 - script: mkdir release; cp obj/*.hex release/
36 displayName: 'Copy artefacts'
37 - task: PublishPipelineArtifact@1
38 displayName: 'Publish Linux release'
40 artifactName: betaflight
41 targetPath: '$(System.DefaultWorkingDirectory)/release/'
48 - task: DownloadPipelineArtifact@2
51 targetPath: '$(Pipeline.Workspace)'
52 - powershell: Write-Output ("##vso[task.setvariable variable=today;]$(Get-Date -Format yyyyMMdd)")
53 - task: GitHubReleasePublish@1
55 githubEndpoint: '$(endpoint)'
56 manuallySetRepository: true
57 githubOwner: '$(owner)'
58 githubRepositoryName: '$(repoName)'
59 githubTag: $(today).$(Build.Repository.Name).$(Build.SourceBranchName)
60 githubReleaseTitle: '$(Build.Repository.Name): $(Build.SourceBranchName) ($(today))'
61 githubReleaseNotes: |+
65 $(Build.Repository.Name) ([link]($(Build.Repository.Uri)))
67 ### Pull request branch:
68 $(Build.SourceBranchName) ([link]($(Build.Repository.Uri)/tree/$(Build.SourceBranchName)))
74 $(Build.SourceVersion) ([link]($(Build.Repository.Uri)/commit/$(Build.SourceVersion)))
77 $(Build.SourceVersionMessage)
80 Build.SourceBranchName
81 $(Build.SourceBranchName)
83 $(Build.Repository.Name)
85 $(Build.Repository.ID)
87 $(Build.Repository.Uri)
92 githubReleaseDraft: false
93 githubReleasePrerelease: false
94 githubIgnoreAssets: false
96 $(Pipeline.Workspace)/betaflight/**
97 githubReuseRelease: true
98 githubReuseDraftOnly: false
99 githubSkipDuplicatedAssets: false
100 githubEditRelease: true
101 githubDeleteEmptyTag: false