Skip to content

Commit 90e38ad

Browse files
author
Danny McCormick
authored
Automatically publish package on CI (#418)
1 parent d9e479a commit 90e38ad

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

azure-pipelines.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,14 @@ steps:
1414

1515
- script: npm run units
1616
displayName: Run unit tests
17+
18+
# For CI runs on master, automatically publish packages
19+
- bash: |
20+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
21+
cd _build
22+
npm publish || true # Ignore publish failures, usually will happen because package already exists
23+
displayName: (azure-pipelines-task-lib) npm publish
24+
workingDirectory: node
25+
condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), eq(variables['build.sourcebranchname'], 'master'))
26+
env:
27+
NPM_TOKEN: $(npmPublishToken)

0 commit comments

Comments
 (0)