Skip to content

Commit 1a2ac32

Browse files
committed
ci: build frontend assets before haskell compile to satisfy hashAssetFile TH splice
1 parent e472182 commit 1a2ac32

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/cli-release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,33 @@ env:
88
LANG: C.UTF-8
99

1010
jobs:
11+
build-frontend:
12+
name: Build Frontend Assets
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '22'
21+
22+
- name: Build CSS
23+
run: |
24+
mkdir -p static/public/assets/css
25+
npm ci
26+
npx tailwindcss -i ./static/public/assets/css/tailwind.css -o ./static/public/assets/css/tailwind.min.css --minify
27+
28+
- name: Upload frontend artifact
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: frontend-assets
32+
path: static/public/assets/css/tailwind.min.css
33+
retention-days: 1
34+
1135
build-linux-x64:
1236
name: Build Linux x86_64
37+
needs: build-frontend
1338
runs-on: blacksmith-4vcpu-ubuntu-2404
1439
container:
1540
image: ghcr.io/monoscope-tech/monoscope-deps:latest
@@ -21,6 +46,12 @@ jobs:
2146
steps:
2247
- uses: actions/checkout@v4
2348

49+
- name: Download frontend artifacts
50+
uses: actions/download-artifact@v4
51+
with:
52+
name: frontend-assets
53+
path: static/public/assets/css
54+
2455
- name: Cache dist-newstyle
2556
uses: actions/cache@v4
2657
with:
@@ -49,6 +80,7 @@ jobs:
4980

5081
build-linux-arm64:
5182
name: Build Linux ARM64
83+
needs: build-frontend
5284
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
5385
container:
5486
image: ghcr.io/monoscope-tech/monoscope-deps:latest
@@ -60,6 +92,12 @@ jobs:
6092
steps:
6193
- uses: actions/checkout@v4
6294

95+
- name: Download frontend artifacts
96+
uses: actions/download-artifact@v4
97+
with:
98+
name: frontend-assets
99+
path: static/public/assets/css
100+
63101
- name: Cache dist-newstyle
64102
uses: actions/cache@v4
65103
with:
@@ -88,10 +126,17 @@ jobs:
88126

89127
build-macos-arm64:
90128
name: Build macOS ARM64
129+
needs: build-frontend
91130
runs-on: macos-latest
92131
steps:
93132
- uses: actions/checkout@v4
94133

134+
- name: Download frontend artifacts
135+
uses: actions/download-artifact@v4
136+
with:
137+
name: frontend-assets
138+
path: static/public/assets/css
139+
95140
- name: Install GHC and Cabal
96141
uses: haskell-actions/setup@v2
97142
with:
@@ -138,10 +183,17 @@ jobs:
138183

139184
build-macos-x64:
140185
name: Build macOS x86_64
186+
needs: build-frontend
141187
runs-on: macos-13
142188
steps:
143189
- uses: actions/checkout@v4
144190

191+
- name: Download frontend artifacts
192+
uses: actions/download-artifact@v4
193+
with:
194+
name: frontend-assets
195+
path: static/public/assets/css
196+
145197
- name: Install GHC and Cabal
146198
uses: haskell-actions/setup@v2
147199
with:

0 commit comments

Comments
 (0)