From 80af5a1e5e28d8338ad9cd900021fb2199b94473 Mon Sep 17 00:00:00 2001 From: rzzf Date: Tue, 29 Sep 2026 18:56:48 +0800 Subject: [PATCH] fix(build): restore workspace context for package publishing (#24934) --- .github/workflows/publish-pr-commit-pkg.yml | 4 ++++ scripts/publish.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-pr-commit-pkg.yml b/.github/workflows/publish-pr-commit-pkg.yml index 5431a8040eb9c..efdecc0538bb3 100644 --- a/.github/workflows/publish-pr-commit-pkg.yml +++ b/.github/workflows/publish-pr-commit-pkg.yml @@ -51,12 +51,16 @@ jobs: - name: Publish for PR if: ${{ github.event_name == 'pull_request' }} + env: + NPM_CONFIG_WORKSPACE_DIR: ${{ github.workspace }} run: | cd dist/element-plus pnpx pkg-pr-new publish --pnpm --packageManager=pnpm,npm,yarn - name: Publish for Commit Push if: ${{ github.event_name == 'push' }} + env: + NPM_CONFIG_WORKSPACE_DIR: ${{ github.workspace }} run: | cd dist/element-plus pnpx pkg-pr-new publish --pnpm --comment=off --packageManager=pnpm,npm,yarn diff --git a/scripts/publish.sh b/scripts/publish.sh index 1fbb75bece150..fa562ffa066a2 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -8,7 +8,7 @@ pnpm update:version pnpm build cd dist/element-plus -pnpm publish --access public --no-git-checks +NPM_CONFIG_WORKSPACE_DIR="$(pwd)/../.." pnpm publish --access public --no-git-checks cd - cd internal/eslint-config