-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
75 lines (64 loc) · 1.86 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
64
65
66
67
68
69
70
71
72
73
74
75
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
batch: true
branches:
include:
- master
- refs/tags/v*
- dev
pr:
- master
pool:
name: Hosted VS2017
steps:
- task: Npm@1
inputs:
command: 'install'
workingDir: './'
displayName: 'install npm submodules'
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
npm run windows_x64
rm build/*.ilk
rm build/*.pdb
ls build
displayName: 'clean windows_x64'
- task: ArchiveFiles@2
displayName: 'Archive build'
inputs:
rootFolderOrFile: build
includeRootFolder: true
archiveType: tar
archiveFile: '$(Build.ArtifactStagingDirectory)/pcan.tar.gz'
- task: GitHubRelease@0
displayName: "GitHub release (create)"
inputs:
gitHubConnection: "ga-connect"
addChangeLog: false
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
- task: Npm@1
inputs:
command: 'custom'
workingDir: './'
customCommand: 'run build'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
- task: Npm@1
inputs:
command: 'publish'
workingDir: './'
customRegistry: 'useFeed'
publishEndpoint: 'npmjs.org'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
- script: |
echo %CVIPUSER%
curl -u %CVIPUSER%:%CVIPPASS% -H "Accept: application/json" -H "Content-type: application/json" -X POST -d "{'action': 'published'}" https://passoa.coding.net/api/cci/job/244432/trigger
displayName: 'Command Line Script'
env:
CVIPUSER: ptos650d93zh
CVIPPASS: 09760a524a3a1acf77cd85a953202d2f15383ffd
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))