From 231c498def05569f7dd43ba37bed97512420ee28 Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Sat, 6 Apr 2024 13:31:48 +0200 Subject: [PATCH] release workflow: fix broken npm update The release workflow wants to use --provenance but the update fails: Run npm install -g npm npm ERR! code EACCES npm ERR! syscall mkdir npm ERR! path /usr/local/share/man/man7 npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/share/man/man7' npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/share/man/man7'] { npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/usr/local/share/man/man7' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator. So we fix it by just telling the action what we want rather than monkey patching it. Link: https://github.com/thelounge/thelounge/actions/runs/8580746748/job/23517165611 --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a15e9eeb..370178fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: + node-version: "latest" registry-url: "https://registry.npmjs.org/" - name: Install @@ -33,9 +34,6 @@ jobs: - name: Test run: yarn test - - name: Update npm - run: npm install -g npm - - name: Publish latest if: "!contains(github.ref, '-')" run: npm publish --tag latest --provenance