This repository was archived by the owner on Jan 2, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +68
-1
lines changed
Expand file tree Collapse file tree 2 files changed +68
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Build Backend with Frontend
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ pull_request :
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ # 1. Checkout 后端仓库
15+ - name : Checkout code
16+ uses : actions/checkout@v5
17+
18+ # 2. 下载前端 zip
19+ - name : Download frontend build
20+ run : |
21+ curl -L -o canteen-frontend-build.zip https://nightly.link/itsHenry35/canteen-management-system-frontend/workflows/build/master/canteen-frontend-build.zip
22+
23+ # 3. 安装 unzip
24+ - name : Install unzip
25+ run : sudo apt-get update && sudo apt-get install -y unzip
26+
27+ # 4. 解压到 static/
28+ - name : Unzip frontend
29+ run : |
30+ mkdir -p static
31+ unzip -o canteen-frontend-build.zip -d static
32+
33+ # 5. Setup Go
34+ - name : Setup Go
35+ uses : actions/setup-go@v5
36+ with :
37+ go-version : 1.24
38+
39+ # 6. 编译Linux
40+ - name : Build Linux binary
41+ id : build-linux
42+ uses : go-cross/cgo-actions@v1
43+ with :
44+ dir : ' .'
45+ targets : linux/amd64
46+
47+ # 7. 上传Linux构建产物
48+ - name : Upload Linux artifact
49+ uses : actions/upload-artifact@v4
50+ with :
51+ name : canteen-management-system-linux
52+ path : ${{ steps.build-linux.outputs.files }}
53+
54+ # 8. 编译Windows
55+ - name : Build Windows binary
56+ id : build-windows
57+ uses : go-cross/cgo-actions@v1
58+ with :
59+ dir : ' .'
60+ targets : windows/amd64
61+
62+ # 9. 上传Windows构建产物
63+ - name : Upload Windows artifact
64+ uses : actions/upload-artifact@v4
65+ with :
66+ name : canteen-management-system-windows
67+ path : ${{ steps.build-windows.outputs.files }}
Original file line number Diff line number Diff line change 2323 runs-on : ubuntu-latest
2424 steps :
2525 - name : Checkout
26- uses : actions/checkout@v4
26+ uses : actions/checkout@v5
2727 - name : Setup Pages
2828 uses : actions/configure-pages@v5
2929 - name : Build with Jekyll
You can’t perform that action at this time.
0 commit comments