2019-03-03 03:17:44 +00:00
|
|
|
trigger:
|
|
|
|
branches:
|
2019-04-15 03:11:07 +00:00
|
|
|
include: ['*']
|
|
|
|
tags:
|
|
|
|
include: ['*']
|
2019-03-03 03:17:44 +00:00
|
|
|
|
2019-06-16 19:44:55 +00:00
|
|
|
resources:
|
|
|
|
repositories:
|
2020-03-19 00:15:52 +00:00
|
|
|
- repository: rust_pipelines
|
2019-06-16 19:44:55 +00:00
|
|
|
type: github
|
|
|
|
name: xoac/rust-azure-pipelines
|
2020-03-19 00:15:52 +00:00
|
|
|
ref: refs/heads/master
|
2019-06-16 19:54:01 +00:00
|
|
|
endpoint: githubConnection
|
2020-03-19 00:15:52 +00:00
|
|
|
stages:
|
|
|
|
- stage: test
|
|
|
|
displayName: "Test"
|
|
|
|
jobs:
|
|
|
|
- template: ci/jobs/cargo-test.yaml@rust_pipelines
|
2019-06-16 19:44:55 +00:00
|
|
|
|
2020-03-19 00:15:52 +00:00
|
|
|
- stage: build
|
|
|
|
displayName: "Build"
|
|
|
|
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
|
2020-03-29 20:52:07 +00:00
|
|
|
jobs:
|
|
|
|
- template: ci/jobs/cargo-build.yaml@rust_pipelines
|
2020-03-19 00:15:52 +00:00
|
|
|
dependsOn:
|
|
|
|
- test
|
2019-03-03 03:17:44 +00:00
|
|
|
|
2020-03-19 00:15:52 +00:00
|
|
|
# Deploy binaries to github only if tags start with `v` for example `v0.1.5`
|
|
|
|
- stage: deploy
|
|
|
|
displayName: "Deploy"
|
|
|
|
dependsOn:
|
|
|
|
- build
|
|
|
|
jobs:
|
|
|
|
- template: ci/scenarios/github/release.yml@rust_pipelines
|
|
|
|
parameters:
|
|
|
|
job_condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
|
|
|
|
gitHubConnection: githubConnection
|