78 lines
1.9 KiB
YAML
78 lines
1.9 KiB
YAML
name: Build Tauri App
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
target: linux
|
|
- os: windows-latest
|
|
target: windows
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
profile: minimal
|
|
override: true
|
|
|
|
# Linux setup
|
|
- name: Install Linux dependencies
|
|
if: matrix.target == 'linux'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
libssl-dev \
|
|
libgtk-3-dev \
|
|
libayatana-appindicator3-dev \
|
|
librsvg2-dev \
|
|
webkit2gtk-4.1 \
|
|
build-essential \
|
|
curl \
|
|
pkg-config \
|
|
xdg-utils
|
|
|
|
# Windows setup
|
|
- name: Install Node.js (needed for frontend)
|
|
if: matrix.target == 'windows'
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: Install Tauri CLI
|
|
run: cargo install tauri-cli
|
|
|
|
- name: Build Tauri App
|
|
run: |
|
|
cd src-tauri
|
|
cargo tauri build
|
|
|
|
# Upload artifacts
|
|
- name: Upload Linux packages
|
|
if: matrix.target == 'linux'
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: tauri-linux-packages
|
|
path: |
|
|
src-tauri/target/release/bytechat-desktop
|
|
src-tauri/target/release/bundle/deb/*.deb
|
|
src-tauri/target/release/bundle/rpm/*.rpm
|
|
|
|
- name: Upload Windows exe
|
|
if: matrix.target == 'windows'
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: tauri-windows-exe
|
|
path: src-tauri/target/release/bundle/msi/*.exe
|