Skip to content

Commit

Permalink
publish to npm stage (#1110)
Browse files Browse the repository at this point in the history
Signed-off-by: nkl199@yahoo.co.uk <nkl199@yahoo.co.uk>
  • Loading branch information
nklincoln committed Jan 5, 2021
1 parent 730a884 commit 6fa9b12
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
1 change: 0 additions & 1 deletion .build/publish.sh → .build/publish-docker.sh
Expand Up @@ -25,5 +25,4 @@ cp ./README.md ./packages/caliper-fisco-bcos/README.md

cd ./packages/caliper-publish/
npm i
./publish.js npm
./publish.js docker --user klenik --publish
28 changes: 28 additions & 0 deletions .build/publish-npm.sh
@@ -0,0 +1,28 @@
#!/bin/bash
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Exit on first error
set -e

# distribute root README file before publishing
cp ./README.md ./packages/caliper-cli/README.md
cp ./README.md ./packages/caliper-core/README.md
cp ./README.md ./packages/caliper-ethereum/README.md
cp ./README.md ./packages/caliper-fabric/README.md
cp ./README.md ./packages/caliper-fisco-bcos/README.md

cd ./packages/caliper-publish/
npm i
./publish.js npm
16 changes: 16 additions & 0 deletions azure-pipelines.yml
Expand Up @@ -94,3 +94,19 @@ stages:
displayName: 'Install Node.js'
- script: |
.build/benchmark-integration-test-direct.sh
- stage: Publish
displayName: Publish Caliper
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['Build.Reason'], 'IndividualCI'))
jobs:
- job: PublishNPM
displayName: 'Publish Caliper NPM packages'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: .build/publish-npm.sh
displayName: Publish packages
env:
NPM_TOKEN: "$(npm)"

0 comments on commit 6fa9b12

Please sign in to comment.