Skip to content

Commit

Permalink
Create the tag manually and not every time on package sersion bump (#363
Browse files Browse the repository at this point in the history
)

Co-authored-by: Rakhi Mundhada <[email protected]>
  • Loading branch information
rakhimundhada15 and Rakhi Mundhada authored Feb 15, 2024
1 parent 5c3eda5 commit 8e5669c
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions ps_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,8 @@ stages:
image: node:18
compute_size: small
commands:
- |
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 [ $(git tag -l "$PKGVERSION") ]; then
echo "Skip tagging $PKGNAME $PKGVERSION version already exist"
else
git tag -a $PKGVERSION -m "$PKGNAME release $PKGVERSION" HEAD
if [ "$WORDCOUNT" -eq 0 ]; then
make test-all
echo "PUBLISHING $PKGNAME $PKGVERSION"
npm run lint
git push origin $PKGVERSION
npm publish --access public
else
echo "NOT PUBLISHING $PKGNAME $PKGVERSION"
fi
fi
- set -ex
- make test-all
- echo done
outputs:
file: ./.ps_outputs/*
Expand Down

0 comments on commit 8e5669c

Please sign in to comment.