Skip to content

Commit d628aec

Browse files
Add a step to the CI to publish the package to Azure DevOps Feed
1 parent 7898b15 commit d628aec

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

azure-pipelines-steps-node.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,18 @@ steps:
2222

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

0 commit comments

Comments
 (0)