forked from stoplightio/prism
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
62 lines (53 loc) · 1.51 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
trigger:
tags:
include:
- v*
branches:
include:
- master
jobs:
- job: test
displayName: Test
pool:
vmImage: vs2017-win2016
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: Install Node.js
- script: yarn
displayName: Install deps
- script: npx jest
displayName: Run tests
- script: yarn build
displayName: Build the code
- script: npx pkg --output ./cli-binaries/prism-cli ./packages/cli/
displayName: Create binary
- bash: yarn test.harness
displayName: Run harness
condition: not(always())
- publish: ./cli-binaries/
artifact: prism-cli-win.exe
- job: publish
dependsOn: test
displayName: Publish binary
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
pool:
vmImage: vs2017-win2016
steps:
- powershell: |
$ver = $env:BUILD_SOURCEBRANCH.remove(0, 10)
Write-Host "##vso[task.setvariable variable=Tag;isOutput=true]$ver"
displayName: 'Update version to Tag'
name: setTag
- task: DownloadPipelineArtifact@2
inputs:
path: $(Build.ArtifactStagingDirectory)
- task: GitHubRelease@0
inputs:
gitHubConnection: spartacusroboticus
assets: '$(Build.ArtifactStagingDirectory)/**/*'
action: edit
assetUploadMode: replace
addChangeLog: false
tag: $(setTag.Tag)