Skip to content

Commit cef4b0d

Browse files
author
Maxim Zaytsev
authored
Add publish stage to pipeline (#358)
1 parent a3eb8f1 commit cef4b0d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

azure-pipelines.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
variables:
2+
isMaster: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
3+
isRelease: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/releases')]
4+
15
parameters:
26
- name: nodeVersionList
37
type: object
@@ -66,3 +70,24 @@ stages:
6670

6771
- script: npm run test
6872
displayName: npm run test
73+
74+
- stage: Publish
75+
condition: or(eq(variables.isRelease, true), eq(variables.isMaster, true))
76+
jobs:
77+
- job: Publish_package
78+
displayName: Publish npm package
79+
steps:
80+
- task: DownloadPipelineArtifact@2
81+
displayName: Download built typed-rest-client package
82+
inputs:
83+
artifact: _build
84+
path: $(Build.SourcesDirectory)/_build
85+
86+
- task: Npm@1
87+
displayName: Publish typed-rest-client to npm
88+
inputs:
89+
command: publish
90+
workingDir: '_build'
91+
publishRegistry: useExternalRegistry
92+
publishEndpoint: NPM-Automation-Token
93+
continueOnError: true

0 commit comments

Comments
 (0)