Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add publish stage to pipeline #358

Merged
merged 2 commits into from
Jun 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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