Skip to content

Commit 2da2c4e

Browse files
committed
fix: make cleanup step cross-platform compatible
- Use bash with conditional logic for Windows vs Unix commands - Windows: Remove-Item -Recurse -Force node_modules - Unix: rm -rf node_modules - Ensures workflow works on all OS platforms (Windows, Linux, macOS)
1 parent 2865110 commit 2da2c4e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@ jobs:
3636
node-version: 20
3737
- name: Clean up
3838
run: |
39-
rm -rf node_modules || true
39+
if [ "$RUNNER_OS" == "Windows" ]; then
40+
Remove-Item -Recurse -Force node_modules -ErrorAction SilentlyContinue
41+
else
42+
rm -rf node_modules || true
43+
fi
4044
npm cache clean --force || true
45+
shell: bash
4146
- run: npm ci
4247
- name: add macos cert
4348
if: contains(matrix.os.name, 'macos')

0 commit comments

Comments
 (0)