Skip to content

Commit 6fa9b12

Browse files
authored
publish to npm stage (#1110)
Signed-off-by: nkl199@yahoo.co.uk <nkl199@yahoo.co.uk>
1 parent 730a884 commit 6fa9b12

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

.build/publish.sh renamed to .build/publish-docker.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,4 @@ cp ./README.md ./packages/caliper-fisco-bcos/README.md
2525

2626
cd ./packages/caliper-publish/
2727
npm i
28-
./publish.js npm
2928
./publish.js docker --user klenik --publish

.build/publish-npm.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
16+
# Exit on first error
17+
set -e
18+
19+
# distribute root README file before publishing
20+
cp ./README.md ./packages/caliper-cli/README.md
21+
cp ./README.md ./packages/caliper-core/README.md
22+
cp ./README.md ./packages/caliper-ethereum/README.md
23+
cp ./README.md ./packages/caliper-fabric/README.md
24+
cp ./README.md ./packages/caliper-fisco-bcos/README.md
25+
26+
cd ./packages/caliper-publish/
27+
npm i
28+
./publish.js npm

azure-pipelines.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,19 @@ stages:
9494
displayName: 'Install Node.js'
9595
- script: |
9696
.build/benchmark-integration-test-direct.sh
97+
98+
- stage: Publish
99+
displayName: Publish Caliper
100+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['Build.Reason'], 'IndividualCI'))
101+
jobs:
102+
- job: PublishNPM
103+
displayName: 'Publish Caliper NPM packages'
104+
steps:
105+
- task: NodeTool@0
106+
inputs:
107+
versionSpec: '10.x'
108+
displayName: 'Install Node.js'
109+
- script: .build/publish-npm.sh
110+
displayName: Publish packages
111+
env:
112+
NPM_TOKEN: "$(npm)"

0 commit comments

Comments
 (0)