Skip to content

Commit 007d03a

Browse files
committed
fix: Add cleanup step to CI and release workflows
- Add node_modules cleanup before npm ci to prevent permission errors - Fixes build failures due to leftover files from previous runs
1 parent 179f5ee commit 007d03a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ jobs:
4242
node-version-file: package.json
4343
cache: npm
4444
cache-dependency-path: package-lock.json
45+
- name: Clean up
46+
run: |
47+
rm -rf node_modules package-lock.json
48+
npm cache clean --force
4549
- name: Install node modules
4650
run: npm ci --no-audit --no-fund --progress=false
4751
- name: Presubmit check (e.g. lint, format)

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ jobs:
3232
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
3333
with:
3434
node-version: 20
35+
- name: Clean up
36+
run: |
37+
rm -rf node_modules package-lock.json || true
38+
npm cache clean --force || true
3539
- run: npm ci
3640
- name: add macos cert
3741
if: contains(matrix.os.name, 'macos')

0 commit comments

Comments
 (0)