Skip to content

Commit ceff927

Browse files
haasonsaasclaude
andcommitted
Fix release workflow: build frontend for binaries, drop QEMU arm64
- Add Node.js setup + frontend build step before Rust compilation so rust-embed can find web/dist - Drop QEMU arm64 from Docker build (amd64 only, no emulation) - Add GHA build cache for faster Docker builds Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9a8c5f3 commit ceff927

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,19 @@ jobs:
100100
- name: Checkout code
101101
uses: actions/checkout@v4
102102

103+
- name: Install Node.js
104+
uses: actions/setup-node@v4
105+
with:
106+
node-version: '20'
107+
108+
- name: Build frontend
109+
run: cd web && npm ci && npm run build
110+
103111
- name: Install Rust
104112
uses: dtolnay/rust-toolchain@stable
105113
with:
106114
targets: ${{ matrix.target }}
107-
115+
108116
- name: Install cross-compilation tools
109117
if: matrix.target == 'aarch64-unknown-linux-gnu'
110118
run: |
@@ -206,29 +214,28 @@ jobs:
206214
- name: Checkout code
207215
uses: actions/checkout@v4
208216

209-
- name: Set up QEMU
210-
uses: docker/setup-qemu-action@v3
211-
212217
- name: Set up Docker Buildx
213218
uses: docker/setup-buildx-action@v3
214-
219+
215220
- name: Login to GitHub Container Registry
216221
uses: docker/login-action@v3
217222
with:
218223
registry: ghcr.io
219224
username: ${{ github.actor }}
220225
password: ${{ secrets.GITHUB_TOKEN }}
221-
226+
222227
- name: Extract version from tag
223228
id: get_version
224229
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
225-
230+
226231
- name: Build and push Docker image
227232
uses: docker/build-push-action@v6
228233
with:
229234
context: .
230-
platforms: linux/amd64,linux/arm64
235+
platforms: linux/amd64
231236
push: true
237+
cache-from: type=gha
238+
cache-to: type=gha,mode=max
232239
tags: |
233240
ghcr.io/haasonsaas/diffscope:latest
234241
ghcr.io/haasonsaas/diffscope:${{ steps.get_version.outputs.VERSION }}

0 commit comments

Comments
 (0)