mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
* AAE-11918 - travis_branch env removal * AAE-11918 - travis_branch env removal * event_type and travis_pull_request_branch env removal * e travis_build_dir, travis_build_number, travis_commit env removal * rename scripts path * remove .travis file * remove .travis file * remove .travis file * just a commit * trying to fix e2e test * fix e2e issue * remove action load travis env * with action travis env var load * remove action travis load env vars * remove action travis load env vars * remove action travis load env vars * last check * test release flow in dry-run * final check for review * fix env variables * fix env variables * fix env variables * remove devel flag * revert renaming action facade * git mv commit * git mv commit
41 lines
1.0 KiB
Bash
Executable File
41 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
cd $DIR/../../../
|
|
|
|
VERSION_IN_PACKAGE_JSON=`node -p "require('./package.json')".version;`;
|
|
BRANCH=${GITHUB_REF##*/}
|
|
if [[ $BRANCH =~ ^master(-patch.*)?$ ]]
|
|
then
|
|
# Pre-release versions
|
|
if [[ $VERSION_IN_PACKAGE_JSON =~ ^[0-9]*\.[0-9]*\.[0-9]*-A\.[0-9]*$ ]];
|
|
then
|
|
TAG_NPM=next
|
|
# Stable major versions
|
|
else
|
|
TAG_NPM=latest
|
|
fi
|
|
fi
|
|
|
|
if [[ $BRANCH =~ ^develop(-patch.*)?$ ]]
|
|
then
|
|
TAG_NPM=alpha
|
|
fi
|
|
|
|
echo "Publishing on GH PKG registry with tag $TAG_NPM"
|
|
./node_modules/@alfresco/adf-cli/bin/adf-cli npm-publish \
|
|
--npmRegistry "npm.pkg.github.com" \
|
|
--tokenRegistry $github_token \
|
|
--tag $TAG_NPM \
|
|
--pathProject "$(pwd)" \
|
|
"$@"
|
|
|
|
echo "Publishing on Public npm registry with tag $TAG_NPM"
|
|
./node_modules/@alfresco/adf-cli/bin/adf-cli npm-publish \
|
|
--npmRegistry $NPM_REGISTRY_ADDRESS \
|
|
--tokenRegistry $NPM_REGISTRY_TOKEN \
|
|
--tag $TAG_NPM \
|
|
--pathProject "$(pwd)" \
|
|
"$@"
|