FEAT: cài đặt các thư viện để chuẩn bị build exe trên window
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
name: windows-build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags: ['v*']
|
||||
|
||||
jobs:
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Install backend deps
|
||||
run: |
|
||||
pip install pyinstaller pywin32
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Precompile JS (Babel)
|
||||
shell: bash
|
||||
run: |
|
||||
npm install --no-audit --no-fund 2>/dev/null || true
|
||||
node node_modules/@babel/cli/bin/babel.js app/static/js/app.jsx --config-file ./babel.config.json -o app/static/js/app.precompiled.js
|
||||
|
||||
- name: Build daw_engine.exe (PyInstaller)
|
||||
run: pyinstaller engine.spec --clean --noconfirm
|
||||
|
||||
- name: Stage sidecar binary (Tauri naming)
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p src-tauri/binaries
|
||||
cp dist/daw_engine.exe "src-tauri/binaries/daw_engine-x86_64-pc-windows-msvc.exe"
|
||||
|
||||
- name: Install Tauri CLI
|
||||
run: npm install -D @tauri-apps/cli@^2
|
||||
|
||||
- name: Build Windows installers (NSIS + MSI)
|
||||
run: npx tauri build --no-bundle 2>/dev/null || npx tauri build
|
||||
|
||||
- name: Upload installer artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: SonicForgeDAW-windows
|
||||
path: |
|
||||
src-tauri/target/release/bundle/nsis/*.exe
|
||||
src-tauri/target/release/bundle/msi/*.msi
|
||||
dist/daw_engine.exe
|
||||
Reference in New Issue
Block a user