Skip to content

Commit a9e2214

Browse files
committed
chore: add Verify packed deps are resolved
1 parent e1ee181 commit a9e2214

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,36 @@ jobs:
3535
- name: Install Dependencies
3636
run: pnpm i
3737

38+
- name: Verify packed deps are resolved
39+
run: |
40+
set -euo pipefail
41+
TMP_DIR="$(mktemp -d)"
42+
PACKAGES=(
43+
"@weapp-tailwindcss/runtime"
44+
"@weapp-tailwindcss/merge"
45+
"@weapp-tailwindcss/merge-v3"
46+
"@weapp-tailwindcss/variants"
47+
"@weapp-tailwindcss/variants-v3"
48+
"@weapp-tailwindcss/cva"
49+
"tailwind-variant-v3"
50+
"@weapp-tailwindcss/typography"
51+
"@weapp-tailwindcss/ui"
52+
"theme-transition"
53+
)
54+
for pkg in "${PACKAGES[@]}"; do
55+
SAFE_PKG="${pkg//@/}"
56+
SAFE_PKG="${SAFE_PKG//\//_}"
57+
PKG_DIR="$TMP_DIR/$SAFE_PKG"
58+
mkdir -p "$PKG_DIR"
59+
pnpm --filter "$pkg" pack --pack-destination "$PKG_DIR"
60+
TARBALL="$(ls "$PKG_DIR"/*.tgz | head -n 1)"
61+
tar -xzf "$TARBALL" -C "$PKG_DIR" package/package.json
62+
if grep -n '"workspace:\\*"' "$PKG_DIR/package/package.json"; then
63+
echo "ERROR: workspace:* found in packed package.json for $pkg"
64+
exit 1
65+
fi
66+
done
67+
3868
- name: Create Release Pull Request or Publish to npm
3969
id: changesets
4070
uses: changesets/action@v1

0 commit comments

Comments
 (0)