Skip to content

Commit

Permalink
publish the lib while merge to master
Browse files Browse the repository at this point in the history
  • Loading branch information
Rakhi Mundhada authored and Rakhi Mundhada committed Jun 21, 2024
1 parent aa7540a commit c3c8e18
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions ps_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,28 @@ stages:
image: node:20
compute_size: small
commands:
- set -ex
- make test-all
- |
set -ex
echo //registry.npmjs.org/:_authToken=$NPM_TOKEN > .npmrc
npm whoami
PKGNAME=$(node -e 'console.log(require("./package.json").name)')
PKGVERSION=$(node -e 'console.log(require("./package.json").version)')
WORDCOUNT=$(npm view "${PKGNAME}@${PKGVERSION}" | wc -c)
git config --global credential.helper \'store\' || true
echo "https://$ALPS_GH_USER:[email protected]" > ~/.git-credentials
npm install
if [ "$WORDCOUNT" -eq 0 ]; then
make test-all
echo "PUBLISHING $PKGNAME $PKGVERSION"
npm run lint
npm publish --access public
else
echo "NOT PUBLISHING $PKGNAME $PKGVERSION"
fi
- echo done
outputs:
file: ./.ps_outputs/*
Expand Down

0 comments on commit c3c8e18

Please sign in to comment.