@@ -81,17 +81,10 @@ jobs:
81
81
82
82
# Determine if the package has changed (or include all on manual trigger)
83
83
if [ "$EVENT_NAME" == "workflow_dispatch" ] || ! git diff --quiet $COMMIT_SHA~1 $COMMIT_SHA -- "$pkg/"; then
84
- HAS_VERSION =$(jq 'has(" version")' "$PKG_JSON" )
85
- if [ "$HAS_VERSION" == "false" ]; then
86
- # Include packages without version field
84
+ OLD_VERSION =$(git show $COMMIT_SHA~1:$PKG_JSON | jq -r '. version' )
85
+ NEW_VERSION=$(jq -r '.version' "$PKG_JSON")
86
+ if [ "$OLD_VERSION" != "$NEW_VERSION" ]; then
87
87
CHANGED_PACKAGES+=("$PKG_NAME")
88
- else
89
- # For packages with version field, include only if version changed
90
- OLD_VERSION=$(git show $COMMIT_SHA~1:$PKG_JSON | jq -r '.version')
91
- NEW_VERSION=$(jq -r '.version' "$PKG_JSON")
92
- if [ "$OLD_VERSION" != "$NEW_VERSION" ]; then
93
- CHANGED_PACKAGES+=("$PKG_NAME")
94
- fi
95
88
fi
96
89
fi
97
90
done
@@ -138,12 +131,6 @@ jobs:
138
131
# Install deps
139
132
pnpm install --frozen-lockfile
140
133
141
- HAS_VERSION=$(jq 'has("version")' package.json)
142
- if [ "$HAS_VERSION" == "false" ]; then
143
- # Only bump version if package has no version field
144
- npm version --no-git-tag-version 1.0.1-$COMMIT_SHA
145
- fi
146
-
147
134
# Check if a custom publish script exists in package.json
148
135
if jq -e '.scripts.publish' package.json > /dev/null; then
149
136
pnpm run publish
0 commit comments