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 1+ name : Build and package (Bun -> single zip)
2+ description : Build with Bun and package a single distributable archive
3+ outputs :
4+ archive_path :
5+ description : Absolute path to the archive
6+ value : ${{ steps.pkg.outputs.archive_path }}
7+ runs :
8+ using : composite
9+ steps :
10+ - name : Setup Bun
11+ uses : ./.github/actions/setup-bun
12+
13+ - name : Verify Bun
14+ shell : bash
15+ run : bun --version
16+
17+ - name : Install dependencies
18+ shell : bash
19+ run : bun install --frozen-lockfile || bun install
20+
21+ - name : Build
22+ shell : bash
23+ run : bun run build
24+
25+ - name : Ensure zip is available
26+ shell : bash
27+ run : sudo apt-get update -y && sudo apt-get install -y zip
28+
29+ - name : Package single file
30+ id : pkg
31+ shell : bash
32+ run : |
33+ set -e
34+ 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
39+ echo "archive_path=$(pwd)/bundle/opencode.zip" >> "$GITHUB_OUTPUT"
You can’t perform that action at this time.
0 commit comments