File tree Expand file tree Collapse file tree
.github/actions/build-package Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Build and package (Bun -> single zip)
2- description : Build with Bun and package a single distributable archive
2+ description : Build with Bun (Turbo) and package a single distributable archive
33outputs :
44 archive_path :
55 description : Absolute path to the archive
1818 shell : bash
1919 run : bun install --frozen-lockfile || bun install
2020
21- - name : Build
21+ - name : Build (Turbo)
2222 shell : bash
23- run : bun run build
23+ run : bunx turbo run build
2424
2525 - name : Ensure zip is available
2626 shell : bash
3232 run : |
3333 set -e
3434 mkdir -p bundle
35- if [ -d dist ]; then SRC=dist; elif [ -d build ]; then SRC=build; else echo 'No dist/ or build/ after build. Check project build output path.' >&2; exit 1; fi
36- cd "$SRC"
37- zip -r ../bundle/opencode.zip .
38- cd - >/dev/null
35+ # Prefer a top-level dist/ or build/ if produced; else package repo (minus heavy dirs)
36+ if [ -d dist ]; then SRC=dist; elif [ -d build ]; then SRC=build; else SRC=.; fi
37+ if [ "$SRC" = "." ]; then
38+ zip -r bundle/opencode.zip . -x '.git/*' '.github/*' 'node_modules/*'
39+ else
40+ (cd "$SRC" && zip -r ../bundle/opencode.zip .)
41+ fi
3942 echo "archive_path=$(pwd)/bundle/opencode.zip" >> "$GITHUB_OUTPUT"
You can’t perform that action at this time.
0 commit comments