Skip to content

Commit 28ecac0

Browse files
committed
fix(release): prune deps before compare
1 parent ac5b89e commit 28ecac0

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,28 @@ runs:
138138
exit 0
139139
fi
140140
141+
DIST_DIR="${PKG_DIR}/dist"
142+
BACKUP_PKG="${PKG_DIR}/.package.json.release.bak"
143+
cp "$PKG_PATH" "$BACKUP_PKG"
144+
145+
pnpm dlx @prover-coder-ai/dist-deps-prune apply \
146+
--dist "${DIST_DIR}" \
147+
--package "${PKG_PATH}" \
148+
--prune-dev true \
149+
--write \
150+
--silent
151+
141152
if ! LOCAL_TARBALL="$(cd "$PKG_DIR" && npm pack --silent --pack-destination "$TMP_DIR" | tail -n 1)"; then
153+
cp "$BACKUP_PKG" "$PKG_PATH"
154+
rm -f "$BACKUP_PKG"
142155
echo "Unable to pack local ${PKG_NAME}; proceeding with release."
143156
echo "should_release=true" >> "$GITHUB_OUTPUT"
144157
exit 0
145158
fi
146159
160+
cp "$BACKUP_PKG" "$PKG_PATH"
161+
rm -f "$BACKUP_PKG"
162+
147163
LOCAL_DIR="${TMP_DIR}/local"
148164
REMOTE_DIR="${TMP_DIR}/remote"
149165
mkdir -p "$LOCAL_DIR" "$REMOTE_DIR"

0 commit comments

Comments
 (0)