File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,14 +25,28 @@ jobs:
2525 registry-url : ' https://registry.npmjs.org'
2626 package-manager-cache : false
2727
28+ # npm >= 11.5.1 is required for OIDC trusted publishing
29+ # npm self-upgrade is broken on ubuntu-24.04 runners (missing promise-retry)
30+ # Use npx to bootstrap a fresh npm copy that can perform the upgrade
31+ - name : Update npm for trusted publishing
32+ run : npx -y npm@latest install -g npm@latest
33+
2834 - name : Install pnpm
2935 run : |
3036 npm install -g pnpm@10.23.0
3137 pnpm --version
3238
33- # Ensure npm 11.5.1 or later is installed for trusted publishing support
34- - name : Update npm to latest version
35- run : npm install -g npm@latest
39+ - name : Get pnpm store directory
40+ shell : bash
41+ run : echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
42+
43+ - name : Setup pnpm cache
44+ uses : actions/cache@v4
45+ with :
46+ path : ${{ env.STORE_PATH }}
47+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
48+ restore-keys : |
49+ ${{ runner.os }}-pnpm-store-
3650
3751 - name : Install dependencies
3852 run : pnpm install --frozen-lockfile
You can’t perform that action at this time.
0 commit comments