Skip to content

Commit

Permalink
Check for RELEASE_PACKAGES only for independent monorepos
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmire committed Oct 14, 2022
1 parent e24e0a5 commit 2cc1e0a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/create-github-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ if [[ -z $RELEASE_STRATEGY ]]; then
exit 1
fi

if [[ -z $RELEASE_PACKAGES ]]; then
IS_MONOREPO_WITH_INDEPENDENT_VERSIONS=$(test "$(jq 'has("workspaces")' package.json)" = "true" && "$RELEASE_STRATEGY" = "independent")

if [[ $IS_MONOREPO_WITH_INDEPENDENT_VERSIONS && -z $RELEASE_PACKAGES ]]; then
echo "Error: No updated packages specified."
exit 1
fi
Expand All @@ -29,7 +31,7 @@ gh release create \
--title "$RELEASE_VERSION" \
--notes "$RELEASE_NOTES"

if [[ "$(jq 'has("workspaces")' package.json)" = "true" && "$RELEASE_STRATEGY" = "independent" ]]; then
if [[ $IS_MONOREPO_WITH_INDEPENDENT_VERSIONS ]]; then
echo "independent versioning strategy"

git config user.name github-actions
Expand Down

0 comments on commit 2cc1e0a

Please sign in to comment.