Skip to content

Commit

Permalink
Add publish stage to pipeline (microsoft#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-zaytsev authored and ajuanjojjj committed Jul 5, 2024
1 parent 3e77a41 commit e23700e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
variables:
isMaster: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
isRelease: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/releases')]

parameters:
- name: nodeVersionList
type: object
Expand Down Expand Up @@ -66,3 +70,24 @@ stages:

- script: npm run test
displayName: npm run test

- stage: Publish
condition: or(eq(variables.isRelease, true), eq(variables.isMaster, true))
jobs:
- job: Publish_package
displayName: Publish npm package
steps:
- task: DownloadPipelineArtifact@2
displayName: Download built typed-rest-client package
inputs:
artifact: _build
path: $(Build.SourcesDirectory)/_build

- task: Npm@1
displayName: Publish typed-rest-client to npm
inputs:
command: publish
workingDir: '_build'
publishRegistry: useExternalRegistry
publishEndpoint: NPM-Automation-Token
continueOnError: true

0 comments on commit e23700e

Please sign in to comment.