fix(ci): packaging 步驟不可在每次 push 執行
Anti-EAV Lint + Quality Gate / anti-eav-lint (push) Successful in 10s
Tests / Unit Tests (push) Successful in 13s
Tests / Integration Tests (push) Successful in 35s
Tests / PHP Lint (push) Successful in 9s
Tests / PHPCS (push) Successful in 24s
Tests / PHPStan (push) Successful in 26s

package-plugin.sh 依 SLUG 解析到 wp-content/plugins 下的固定路徑,打包的是
線上工作副本而非 CI 的 checkout,且會在該目錄跑 composer install --no-dev
→ 每次 push 都會把開發機的 vendor/bin 清掉(本 session 中發生兩次)。

- anti-eav-lint.yml:移除 packaging 步驟,只保留 lint
- ci-package.sh:委派共用腳本後補跑 composer install 還原 dev 依賴

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
This commit is contained in:
2026-07-31 09:31:09 +08:00
parent c712bf6e0a
commit bc4fad3b86
2 changed files with 17 additions and 11 deletions
+6 -11
View File
@@ -53,14 +53,9 @@ jobs:
echo "TMDO_HOST not found; skipping anti-eav lint"
fi
- name: Packaging audit (10-check)
run: |
# package-plugin.sh lives in the wp-local-dev tree and is shared by all
# custom plugins; its output goes to wp-local-dev/dist/.
PACKAGING_HOST="/var/www/Studio/wp-local-dev"
if [ -d "$PACKAGING_HOST" ]; then
SLUG="2meet-data-optimizer"
bash "$PACKAGING_HOST/scripts/package-plugin.sh" "$SLUG"
else
echo "PACKAGING_HOST not found; skipping packaging audit"
fi
# NOTE: no packaging audit here on purpose.
# The shared package-plugin.sh resolves the plugin by SLUG to a fixed path
# under wp-content/plugins — it does NOT package the CI checkout. Running it
# from a job therefore rebuilds (and `composer install --no-dev`s) the live
# working copy, wiping the developer's vendor/bin. Packaging belongs to the
# release workflow / a manual run, not to every push.