Skip to content

Commit

Permalink
test: cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget committed Aug 22, 2022
1 parent c71f8d2 commit 93bbda9
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .github/scripts/publish-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,23 @@ if [[ $PRE_RELEASE == 'true' ]]; then
fi

echo "πŸ“° Publish Package to Registry ($NEXT)"
for REGISTRY in NPM GITHUB;
for REGISTRY in 'GITHUB' 'NPM'
do
echo "πŸ”‘ Authenticate $REGISTRY NPM Registry"
if [[ $REGISTRY == 'NPM' ]]; then
npm config set registry https://registry.npmjs.org/
npm set //registry.npmjs.org/:_authToken "$NPM_TOKEN"
elif [[ $REGISTRY == 'GITHUB' ]]; then
echo "πŸ”’ Authenticate $REGISTRY NPM Registry"
if [[ $REGISTRY == 'GITHUB' ]]; then
npm config set registry https://npm.pkg.github.com
npm set //npm.pkg.github.com/:_authToken "$GPR_TOKEN"
echo "πŸ”‘ Authenticated with GITHUB"
elif [[ $REGISTRY == 'NPM' ]]; then
npm config set registry https://registry.npmjs.org/
npm set //registry.npmjs.org/:_authToken "$NPM_TOKEN"
echo "πŸ”‘ Authenticated with NPM"
else
echo "Could not authenticate with $REGISTRY"
exit 1
fi
npm publish db-ui-elements"$PACKAGE_ENDING"-"$VALID_SEMVER_VERSION".tgz --quiet "$NEXT"
npm publish db-ui-ngx-elements"$PACKAGE_ENDING"-"$VALID_SEMVER_VERSION".tgz --quiet "$NEXT"
npm publish db-ui-react-elements"$PACKAGE_ENDING"-"$VALID_SEMVER_VERSION".tgz --quiet "$NEXT"
npm publish db-ui-v-elements"$PACKAGE_ENDING"-"$VALID_SEMVER_VERSION".tgz --quiet "$NEXT"
npm publish --quiet db-ui-elements"$PACKAGE_ENDING"-"$VALID_SEMVER_VERSION".tgz "$NEXT"
npm publish --quiet db-ui-ngx-elements"$PACKAGE_ENDING"-"$VALID_SEMVER_VERSION".tgz "$NEXT"
npm publish --quiet db-ui-react-elements"$PACKAGE_ENDING"-"$VALID_SEMVER_VERSION".tgz "$NEXT"
npm publish --quiet db-ui-v-elements"$PACKAGE_ENDING"-"$VALID_SEMVER_VERSION".tgz "$NEXT"
done

0 comments on commit 93bbda9

Please sign in to comment.