Skip to content

Commit 207658b

Browse files
committed
ci: building
1 parent c2193a1 commit 207658b

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Build bundle and binaries
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- setup-ci
7+
8+
concurrency:
9+
group: ci-build-main
10+
11+
env:
12+
DO_NOT_TRACK: 1
13+
AWS_REGION: us-east-1
14+
15+
jobs:
16+
bundle:
17+
runs-on: blacksmith-4vcpu-ubuntu-2204
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: jdx/mise-action@v2
21+
with:
22+
version: 2025.2.7
23+
install: true
24+
cache: true
25+
- name: Restore Bun dependencies cache
26+
uses: useblacksmith/cache@v5
27+
continue-on-error: false
28+
with:
29+
path: node_modules
30+
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
31+
restore-keys: ${{ runner.os }}-bun-
32+
- name: Bun install
33+
run: bun install --frozen-lockfile
34+
- name: Build bundle
35+
run: bun run build
36+
- name: Create NPM archive
37+
run: bun pm pack
38+
- name: Archive build artificats
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: dist-bundle
42+
path: |
43+
dist
44+
*.tgz
45+
46+
compile:
47+
runs-on: blacksmith-4vcpu-ubuntu-2204
48+
steps:
49+
- uses: actions/checkout@v4
50+
- uses: jdx/mise-action@v2
51+
with:
52+
version: 2025.2.7
53+
install: true
54+
cache: true
55+
- name: Get bun version
56+
run: echo "bun_version=$(bun --version)" >> $GITHUB_ENV
57+
- name: Restore Bun dependencies and binaries cache
58+
uses: useblacksmith/cache@v5
59+
continue-on-error: false
60+
with:
61+
path: |
62+
node_modules
63+
~/.bun/install/cache/bun-*-v${{ env.bun_version }}
64+
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock', format('~/.bun/install/cache/bun-*-v{0}', env.bun_version)) }}
65+
restore-keys: ${{ runner.os }}-bun-
66+
- name: Bun install
67+
run: bun install --frozen-lockfile
68+
- name: Build binaries
69+
run: bun run build:bin
70+
- name: Archive build artificats
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: dist-compile
74+
path: |
75+
dist

0 commit comments

Comments
 (0)