forked from JedWatson/react-select
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
93 lines (84 loc) · 2.57 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
trigger:
branches:
include:
- main
pr: none
variables:
SourcesDirectory: '$(Build.SourcesDirectory)'
Project: 'ReactSelect'
BuildConfiguration: 'Release'
Config: '--configuration=$(BuildConfiguration)'
CakePathLocation: '$(System.DefaultWorkingDirectory)'
ReportDir: '$(Common.TestResultsDirectory)\coverage_report'
TagName: 'v$(Build.BuildNumber)'
stages:
- stage: Build
displayName: 'Build'
jobs:
- job: Build
displayName: 'Build Job'
timeoutInMinutes: 30
pool:
vmImage: 'windows-latest'
steps:
#Install Nuget version 5.2
- task: NuGetToolInstaller@1
displayName: 'Install NuGet'
inputs:
versionSpec: 5.2.x
#Restore the project packages
- task: npmAuthenticate@0
inputs:
workingFile: '.npmrc'
customEndpoint: 'NPM Authentication Token'
- task: cake-build.cake.cake-build-task.Cake@0
displayName: Install
inputs:
target: Install
arguments: '--configuration=Release -Pipeline'
- task: cake-build.cake.cake-build-task.Cake@0
displayName: Build
inputs:
target: Build
arguments: '--configuration=Release -Pipeline'
- task: cake-build.cake.cake-build-task.Cake@0
displayName: Tests
inputs:
target: Tests
arguments: '--configuration=Release -Pipeline'
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(System.DefaultWorkingDirectory)'
artifact: 'artifacts'
publishLocation: 'pipeline'
- stage: Deploy
displayName: 'Deploy'
jobs:
- deployment: Deploy
displayName: 'Deploy to npm private repository and creates a git release'
timeoutInMinutes: 30
pool:
vmImage: 'windows-latest'
environment: Automatic-Release
strategy:
runOnce:
deploy:
steps:
#Creates a Github release
- task: GitHubRelease@1
inputs:
gitHubConnection: 'GitHub Release'
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: '$(TagName)'
changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'commitBased'
#Publishes the package into the private artifact repository
- task: Npm@1
inputs:
command: 'publish'
workingDir: '$(Pipeline.Workspace)/artifacts/'
publishRegistry: 'useFeed'
publishFeed: 'd8b4d1eb-aeb3-4b5b-9b43-37b4fc985e2f'