From 16275488a4e907ea818106e257d2b33a7ca52d65 Mon Sep 17 00:00:00 2001 From: Minsu Lee Date: Mon, 22 Jun 2026 21:58:48 +0900 Subject: [PATCH] fix(release): sudo npm install -g for Trusted Publishing upgrade The v0.1.3 run built all 6 targets, uploaded assets, and updated the Homebrew formula, but publish-npm failed at the very first step: 'npm install -g npm@latest' hit EACCES on /usr/local/share/man/man7. The global npm prefix (/usr/local) is root-owned on ubuntu runners, so installing a new global npm needs sudo. Without the upgrade npm stays at 10.x and Trusted Publishing (needs >= 11.5.1) can't authenticate via OIDC. This was the next latent failure exposed now that upload + Homebrew finally run end-to-end. --- .github/workflows/release-please.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 99feb1f..9af4e41 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -118,9 +118,11 @@ jobs: persist-credentials: false # Trusted Publishing requires npm >= 11.5.1; ubuntu-latest ships npm 10.x - # with Node 22, so upgrade the CLI before publishing. + # with Node 22, so upgrade the CLI before publishing. The global prefix + # (/usr/local) is root-owned, so installing a new global npm needs sudo — + # without it npm fails with EACCES on /usr/local/share/man. - name: Upgrade npm for Trusted Publishing - run: npm install -g npm@latest + run: sudo npm install -g npm@latest - name: Download released binaries env: