File tree Expand file tree Collapse file tree
.github/actions/setup-bun Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,10 +11,25 @@ runs:
1111 restore-keys : |
1212 ${{ runner.os }}-bun-
1313
14+ - name : Get baseline download URL
15+ id : bun-url
16+ shell : bash
17+ run : |
18+ if [ "$RUNNER_ARCH" = "X64" ]; then
19+ V=$(node -p "require('./package.json').packageManager.split('@')[1]")
20+ case "$RUNNER_OS" in
21+ macOS) OS=darwin ;;
22+ Linux) OS=linux ;;
23+ Windows) OS=windows ;;
24+ esac
25+ echo "url=https://bun.sh/download/${V}/${OS}/x64?avx2=false&profile=false" >> "$GITHUB_OUTPUT"
26+ fi
27+
1428 - name : Setup Bun
1529 uses : oven-sh/setup-bun@v2
1630 with :
17- bun-version-file : package.json
31+ bun-version-file : ${{ !steps.bun-url.outputs.url && 'package.json' || '' }}
32+ bun-download-url : ${{ steps.bun-url.outputs.url }}
1833
1934 - name : Install dependencies
2035 run : bun install
You can’t perform that action at this time.
0 commit comments