-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create the tag manually and not every time on package sersion bump (#363
) Co-authored-by: Rakhi Mundhada <[email protected]>
- Loading branch information
1 parent
5c3eda5
commit 8e5669c
Showing
1 changed file
with
2 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/* | ||
|