Files
alfresco-content-app/.github/actions/publish-libs/npm-publish.sh
Michal Kinas 907d4c4cd6 [ACS-10763] Switch to NPM trusted publishing (#4907)
* [ACS-10763] Switch to NPM trusted publishing

* [ACS-10763] Change contents permission to read

* [ACS-10763] Cover GH packages

* [ACS-10763] Bump Node and NPM versions to match trusted publishing requirements

* [ACS-10763] Add the exit on error step for publishing

* [ACS-10763] Fix package lock, move set -e to the release script
2025-11-26 09:57:41 +01:00

33 lines
603 B
Bash
Executable File

#!/usr/bin/env bash
set -e
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../.." && pwd )"
DIST_DIR="$ROOT_DIR/dist/@alfresco"
TAG=$1
DRY_RUN=$2
if [[ -z "$TAG" ]]; then
echo "Missing tag parameter"
exit 1
fi
export PROJECTS=(
'aca-content'
'aca-shared'
'aca-playwright-shared'
);
for PROJECT in ${PROJECTS[@]}
do
cd $DIST_DIR/$PROJECT
if [[ "$DRY_RUN" == "true" ]]; then
echo "[DRY RUN] Publishing \"$PROJECT\" with \"$TAG\" tag"
npm publish --dry-run --tag "$TAG"
else
echo "Publishing \"$PROJECT\" with \"$TAG\" tag"
npm publish --tag "$TAG"
fi
done