Skip to content

Commit 8378f55

Browse files
committed
github: action: Add built frontend
1 parent c10d881 commit 8378f55

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

.github/workflows/action.yml

+37-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ jobs:
3333
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y
3434
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
3535
36+
- name: Install build dependencies - Bun
37+
uses: oven-sh/setup-bun@v2
38+
with:
39+
bun-version: 1.1.22
40+
3641
- name: Check style
3742
run: cargo fmt --check
3843

@@ -42,8 +47,31 @@ jobs:
4247
- name: Build
4348
run: cargo build --verbose
4449

50+
build-frontend:
51+
runs-on: ubuntu-22.04
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v4
55+
56+
- name: Setup Bun
57+
uses: oven-sh/setup-bun@v2
58+
with:
59+
bun-version: 1.1.22
60+
61+
- name: Install dependencies and build Bun project
62+
run: |
63+
cd ping-viewer-next-frontend
64+
bun install --frozen-lockfile
65+
bun run build
66+
67+
- name: Upload dist folder
68+
uses: actions/[email protected]
69+
with:
70+
name: dist
71+
path: ./ping-viewer-next-frontend/dist
72+
4573
build:
46-
needs: quick-tests
74+
needs: [quick-tests, build-frontend]
4775
runs-on: ${{ matrix.os }}
4876
strategy:
4977
fail-fast: false
@@ -73,11 +101,18 @@ jobs:
73101
run: echo "${{ matrix.TARGET }}"
74102

75103
- uses: actions/checkout@master
104+
105+
- name: Download frontend build
106+
uses: actions/[email protected]
107+
with:
108+
name: dist
109+
path: ./ping-viewer-next-frontend/dist
110+
76111
- name: Build
77112
uses: houseabsolute/[email protected]
78113
with:
79114
target: ${{ matrix.TARGET }}
80-
args: "--release"
115+
args: "--release --features embed-frontend"
81116

82117
- name: Rename
83118
run: cp target/${{ matrix.TARGET }}/release/${{ github.event.repository.name }}${{ matrix.EXTENSION }} ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}

0 commit comments

Comments
 (0)