Skip to content

Commit

Permalink
Add a step to the CI to publish the package to Azure DevOps Feed
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanduplenskikh committed Nov 5, 2024
1 parent 7898b15 commit d628aec
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion azure-pipelines-steps-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@ steps:

# Only on Linux. For CI runs on master, automatically publish packages
- ${{ if eq(parameters.os, 'Linux') }}:
- bash: |
cp -f ../.npmrc .npmrc
npm publish || true # Ignore publish failures, usually will happen because package already exists
rm -f .npmrc
displayName: (task-lib) Publish the package to Azure DevOps Feed
workingDirectory: node/_build
condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranch'], 'refs/heads/master'))
- bash: |
echo //registry.npmjs.org/:_authToken=\${NPM_TOKEN} > .npmrc
npm publish || true # Ignore publish failures, usually will happen because package already exists
displayName: (task-lib) npm publish
displayName: (task-lib) Publish the package to npm
workingDirectory: node/_build
condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranch'], 'refs/heads/master'))
env:
Expand Down

0 comments on commit d628aec

Please sign in to comment.