fix(ci): add frontend build step before Go vet/test/build
All checks were successful
Beta Release / beta (push) Successful in 1m16s

All three CI workflows now build the React frontend (npm ci && npm run
build) before any Go steps, so the go:embed directive in
cmd/muyue-desktop/main.go finds the dist/ directory.

- ci-develop.yml: already rewritten, included in this commit
- ci-main.yml: add Node 22 setup, cache, frontend build, desktop binary
  builds for all platforms, updated changelog download table
- ci-pr.yml: add Node 22 setup, cache, frontend build, desktop binary
  build check

💘 Generated with Crush

Assisted-by: GLM-5.1 via Crush <crush@charm.land>
This commit is contained in:
Augustin
2026-04-20 22:54:40 +02:00
parent 88d2a03808
commit 097cf40ccd
3 changed files with 97 additions and 5 deletions

View File

@@ -15,6 +15,11 @@ jobs:
with:
go-version: '1.24.3'
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Cache Go modules
uses: actions/cache@v4
with:
@@ -25,9 +30,23 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: Cache Node modules
uses: actions/cache@v4
with:
path: cmd/muyue-desktop/frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('cmd/muyue-desktop/frontend/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Download dependencies
run: go mod download
- name: Build frontend
run: |
cd cmd/muyue-desktop/frontend
npm ci
npm run build
- name: Vet
run: go vet ./...
@@ -37,4 +56,5 @@ jobs:
- name: Build
run: |
go build -o muyue ./cmd/muyue/
go build -o muyue-desktop ./cmd/muyue-desktop/
./muyue version