feat: initial Tauri desktop shell for BatchTube v1.0
This commit is contained in:
93
.github/workflows/build.yml
vendored
Normal file
93
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
name: Build BatchTube Desktop App
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: 'macos-latest'
|
||||
args: '--target aarch64-apple-darwin'
|
||||
- platform: 'macos-latest'
|
||||
args: '--target x86_64-apple-darwin'
|
||||
- platform: 'ubuntu-22.04'
|
||||
args: ''
|
||||
- platform: 'windows-latest'
|
||||
args: ''
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python 3.11
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
pip install -r backend/requirements.txt
|
||||
pip install pyinstaller
|
||||
|
||||
- name: Bundle Python backend with PyInstaller
|
||||
run: |
|
||||
cd backend
|
||||
pyinstaller batchtube-server.spec
|
||||
mkdir -p ../src-tauri/binaries
|
||||
shell: bash
|
||||
|
||||
- name: Copy sidecar binary (Windows)
|
||||
if: matrix.platform == 'windows-latest'
|
||||
run: cp backend/dist/batchtube-server.exe src-tauri/binaries/batchtube-server-x86_64-pc-windows-msvc.exe
|
||||
shell: bash
|
||||
|
||||
- name: Copy sidecar binary (macOS arm)
|
||||
if: matrix.platform == 'macos-latest' && contains(matrix.args, 'aarch64')
|
||||
run: cp backend/dist/batchtube-server src-tauri/binaries/batchtube-server-aarch64-apple-darwin
|
||||
|
||||
- name: Copy sidecar binary (macOS x86)
|
||||
if: matrix.platform == 'macos-latest' && contains(matrix.args, 'x86_64')
|
||||
run: cp backend/dist/batchtube-server src-tauri/binaries/batchtube-server-x86_64-apple-darwin
|
||||
|
||||
- name: Copy sidecar binary (Linux)
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
run: cp backend/dist/batchtube-server src-tauri/binaries/batchtube-server-x86_64-unknown-linux-gnu
|
||||
|
||||
- name: Install Linux dependencies
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build Tauri app
|
||||
uses: tauri-apps/tauri-action@v0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||
with:
|
||||
tagName: ${{ github.ref_name }}
|
||||
releaseName: 'BatchTube v__VERSION__'
|
||||
releaseBody: 'See CHANGELOG for details'
|
||||
releaseDraft: true
|
||||
prerelease: false
|
||||
args: ${{ matrix.args }}
|
||||
Reference in New Issue
Block a user