Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

ci: install npm@latest into separate prefix for Trusted Publishers

Generefc2f6e4ac89
diff --git a/.github/workflows/publish-cli.yml b/.github/workflows/publish-cli.yml
index b17885c9f..1ed0f6c4b 100644
--- a/.github/workflows/publish-cli.yml
+++ b/.github/workflows/publish-cli.yml
@@ -38,7 +38,11 @@ jobs:
cache: pnpm
- name: Upgrade npm for Trusted Publishers
- run: npm install -g npm@latest
+ # Install into a separate prefix so the running npm doesn't overwrite
+ # its own node_modules mid-install (npm/cli#7657).
+ run: |
+ npm install -g --prefix="$RUNNER_TEMP/npm-new" npm@latest
+ echo "$RUNNER_TEMP/npm-new/bin" >> "$GITHUB_PATH"
- run: pnpm install --frozen-lockfile