strapi/scripts/publish.sh
Bassel Kanso 4f7acd10ad ci: adding release workflow (#22640)
(cherry picked from commit c0ba89207b301f8809242f01f6ee459dd0c5ce86)
2025-01-15 10:49:19 +01:00

25 lines
568 B
Bash
Executable File

#!/bin/bash
# Force start from root folder
cd "$(dirname "$0")/.."
set -e
version=$VERSION
distTag=$DIST_TAG
if [[ -z "$version" ]]; then
echo "Please enter the version you want to publish"
read -r version
fi
if [[ -z "$distTag" ]]; then
echo "Please enter the dist-tag you want to publish with"
read -r distTag
fi
# publish packages
./node_modules/.bin/nx run-many --target=clean --nx-ignore-cycles
./node_modules/.bin/nx run-many --target=build --nx-ignore-cycles --skip-nx-cache
yarn release --version "$version" --tag "$distTag" --dry-run false "$@"