-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathazure-pipelines.yml
64 lines (57 loc) · 2.32 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Docs see here:
# https://aka.ms/yaml
trigger:
tags:
include:
- '*'
branches:
include:
- '*'
jobs:
- job: 'create_release'
displayName: 'Release'
timeoutInMinutes: 120
pool:
vmImage: 'ubuntu-18.04'
steps:
- checkout: self
submodules: recursive
- task: Bash@3
inputs:
targetType: FilePath
filePath: ./tools/azure_build.sh
failOnStderr: false
displayName: Build Toolchain in Docker
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: raspi-toolchain
# publishing artifacts from PRs from a fork is currently blocked
condition: succeeded()
displayName: "Publish Artifact: Toolchain package"
# See https://github.com/microsoft/azure-pipelines-tasks/issues/11260#issuecomment-527343172
- bash: echo "##vso[task.setvariable variable=TAG]${BUILD_SOURCEBRANCH##refs/tags/}"
displayName: Set TAG variable for $(Build.SourceBranch)
condition: startswith(variables['Build.SourceBranch'], 'refs/tags/')
- task: GitHubRelease@0
# Only execute this task if a tags build
condition: startswith(variables['Build.SourceBranch'], 'refs/tags/')
inputs:
gitHubConnection: 'pro-raspi-toolchain'
repositoryName: '$(Build.Repository.Name)'
action: 'edit' # Options: create, edit, delete
target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit
tagSource: 'Git tag'
#tagPattern: # Optional
tag: $(TAG) # Required when action == Edit || Action == Delete || TagSource == Manual
#title: # Optional
#releaseNotesSource: 'file' # Optional. Options: file, input
#releaseNotesFile: # Optional
#releaseNotes: # Optional
assets: '$(Build.ArtifactStagingDirectory)/*' # Optional
assetUploadMode: 'replace' # Optional. Options: delete, replace
#isDraft: false # Optional
#isPreRelease: false # Optional
addChangeLog: false # Optional
#compareWith: 'lastFullRelease' # Required when addChangeLog == True. Options: lastFullRelease, lastRelease, lastReleaseByTag
#releaseTag: # Required when compareWith == LastReleaseByTag