-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yaml
57 lines (56 loc) · 1.94 KB
/
azure-pipelines.yaml
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
trigger:
- main
pr: none
variables:
MajorVersion : 0
MinorVersion : 0
PatchVersion : $[counter(format('nexus-extension-{0}.{1}',variables['MajorVersion'],variables['MinorVersion']), 48)]
stages:
- stage : build_package
displayName: Build & Package Extension
jobs:
- job : build_package
displayName: Build & Package Extension
pool:
vmImage: 'windows-latest'
steps:
- checkout: self
persistCredentials: true
clean: true
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: npm install -g tfx-cli
displayName: 'Install Node CLI for Azure DevOps'
- script: npm install
displayName: 'Install Dependencies'
- script: npm run lint
displayName: 'Run ESLint'
- script: |
npm run package -- --override {\"version\": \"$(MajorVersion).$(MinorVersion).$(PatchVersion)\"}
displayName: 'Build & Package Extension'
- task: PowerShell@2
displayName: 'Tag Git Commit'
inputs:
targetType: 'inline'
script: |
git tag "v$(MajorVersion).$(MinorVersion).$(PatchVersion)"
- task: PowerShell@2
displayName: 'Push Git Tags'
inputs:
targetType: 'inline'
script: |
git push --tags
- task: GitHubRelease@1
displayName: 'Publish Extension as Release'
inputs:
gitHubConnection: 'github.com_keyoke'
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'gitTag'
tagPattern: 'v$(MajorVersion).$(MinorVersion).$(PatchVersion)'
assets: '$(System.DefaultWorkingDirectory)\packages\*.vsix'
changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'commitBased'