Skip to content

Commit fb0ae6a

Browse files
committed
fix change detection in prepare publish
1 parent e585c6a commit fb0ae6a

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ jobs:
108108
id: check_changes
109109
run: |
110110
echo "### Following pending deployments found" >> $GITHUB_STEP_SUMMARY
111-
OUTPUT=$(yarn lerna exec --loglevel silent --concurrency 1 -- \
111+
OUTPUT=$(yarn --silent lerna exec --loglevel silent --concurrency 1 -- \
112112
'VERSION=$(node -p "require(\"./package.json\").version"); \
113113
if [ "$(npm view $LERNA_PACKAGE_NAME version --registry=https://npm.pkg.github.com/ 2>/dev/null || echo "0.0.0")" != "$VERSION" ]; then \
114114
echo "- **$LERNA_PACKAGE_NAME** - will publish version $VERSION"; \
115-
fi' | grep '\- \*\*' || true)
115+
fi' | grep '^\- \*\*' || true)
116116
if [ -n "$OUTPUT" ]; then
117117
echo "$OUTPUT" >> $GITHUB_STEP_SUMMARY
118118
echo "has_changes=true" >> $GITHUB_OUTPUT

test-script.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
OUTPUT=$(yarn --silent lerna exec --loglevel silent --concurrency 1 -- \
2+
'VERSION=$(node -p "require(\"./package.json\").version"); \
3+
if [ "$(npm view $LERNA_PACKAGE_NAME version --registry=https://npm.pkg.github.com/ 2>/dev/null || echo "0.0.0")" != "$VERSION" ]; then \
4+
echo "- **$LERNA_PACKAGE_NAME** - will publish version $VERSION"; \
5+
fi' | grep '^\- \*\*' || true)
6+
7+
echo "---"
8+
if [ -n "$OUTPUT" ]; then
9+
echo "HAS CHANGES"
10+
echo "$OUTPUT"
11+
else
12+
echo "NO CHANGES"
13+
fi

0 commit comments

Comments
 (0)