From 027a817b13f0e17e8e8edb020b569c476ac8f655 Mon Sep 17 00:00:00 2001 From: Gokdeniz Kaymak Date: Thu, 21 May 2026 15:09:40 +0200 Subject: [PATCH] fix: another fix attempt on publishing --- .github/workflows/publish.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 46e360b..b11a524 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,6 +27,17 @@ jobs: registry-url: 'https://registry.npmjs.org' cache: npm + # npm trusted publishing (OIDC) needs npm >= 11.5. Node 22 ships npm 10.x, + # so we upgrade. Running `npm install -g npm@latest` with the bundled npm + # races against itself (it overwrites its own files mid-execution, then + # fails to `require` removed internal modules). Use npx to fetch + # npm@latest into a separate location and let *that* npm do the global + # install — running process and target path are distinct, no race. + - name: Upgrade npm for trusted publishing + run: | + npx -y npm@latest install -g npm@latest + npm --version + - name: Install dependencies run: npm ci