File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -22,16 +22,20 @@ jobs:
2222 steps :
2323 - uses : actions/checkout@v4
2424
25- # Clean cache directories before restoring cache
26- - name : Clean Go Modules Directory
25+ # Clean cache directories on Linux/Mac
26+ - name : Clean Cache on Linux/Mac
27+ if : runner.os != 'Windows'
2728 run : |
28- if [ "${{ runner.os }}" == "Windows" ]; then
29- Remove-Item -Recurse -Force $HOME\.cache\go-build, $HOME\go\pkg\mod
30- else
31- rm -rf ~/.cache/go-build ~/go/pkg/mod
32- fi
29+ rm -rf ~/.cache/go-build ~/go/pkg/mod
3330 shell : bash
3431
32+ # Clean cache directories on Windows
33+ - name : Clean Cache on Windows
34+ if : runner.os == 'Windows'
35+ run : |
36+ Remove-Item -Recurse -Force $env:USERPROFILE\.cache\go-build, $env:USERPROFILE\go\pkg\mod
37+ shell : pwsh
38+
3539 # Cache Go modules to speed up builds
3640 - name : Cache Go Modules
3741 uses : actions/cache@v4
You can’t perform that action at this time.
0 commit comments