feat: github action build linux added

This commit is contained in:
2026-04-24 23:58:06 +02:00
parent 7262236b7d
commit 7bca85261a

70
.github/workflows/build-linux.yml vendored Normal file
View File

@ -0,0 +1,70 @@
name: Build Linux
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- platform: 'windows-latest'
name: 'windows'
- platform: 'ubuntu-22.04'
name: 'linux'
# - platform: 'macos-latest' # si un jour tu veux macOS
# name: 'macos'
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Installer Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'
- name: Installer Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Installer les dépendances système Linux
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: Installer les dépendances npm
run: npm ci
- name: Build Tauri
run: npm run tauri build
- name: Upload Windows artifacts
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: windows-build
path: |
src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/release/bundle/nsis/*.exe
- name: Upload Linux artifacts
if: matrix.platform == 'ubuntu-22.04'
uses: actions/upload-artifact@v4
with:
name: linux-build
path: |
src-tauri/target/release/bundle/deb/*.deb
src-tauri/target/release/bundle/rpm/*.rpm
src-tauri/target/release/bundle/appimage/*.AppImage