feat: CI/CD workflow for automated MSI/AppImage/deb desktop build
CI / lint (push) Successful in 24s
CI / security (push) Successful in 13s
CI / test (push) Successful in 27s
CI / build (push) Successful in 6s
CI / e2e (push) Failing after 24s

- .gitea/workflows/desktop-build.yml: compiles on push to main
- Windows runner: Rust + Tauri + Python embed → MSI
- Linux runner: Rust + Tauri + webkit2gtk → AppImage + .deb
- Artifacts uploaded with 30-day retention
- Triggers when desktop/, frontend/, or backend/ changes
- Manual trigger via workflow_dispatch
- Updated ROADMAP #77 to mark CI/CD as done
This commit is contained in:
2026-07-24 18:07:03 -04:00
parent db72e6f055
commit 593bb9d9c2
2 changed files with 87 additions and 0 deletions
+86
View File
@@ -0,0 +1,86 @@
name: Desktop Build
on:
push:
branches: [main]
paths:
- 'desktop/**'
- 'frontend/**'
- 'backend/**'
workflow_dispatch: # permet de lancer manuellement
jobs:
build-windows:
runs-on: [self-hosted, windows, desktop] # runner sur ta machine Windows
steps:
- uses: actions/checkout@v4
- name: Setup Rust
run: rustup default stable && rustup update
- name: Setup Tauri CLI
run: cargo install tauri-cli --version "^2.0"
- name: Setup Python 3.11 embed
run: |
curl -L -o python-embed.zip "https://www.python.org/ftp/python/3.11.15/python-3.11.15-embed-amd64.zip"
powershell Expand-Archive -Path python-embed.zip -DestinationPath desktop/python-embed
echo import site >> desktop/python-embed/python311._pth
cd desktop/python-embed
./python.exe -m pip install --no-cache-dir -r ../../backend/requirements.txt
- name: Build MSI
working-directory: desktop
run: cargo tauri build --bundles msi
- name: Upload MSI artifact
uses: actions/upload-artifact@v4
with:
name: obsigate-windows-msi
path: desktop/target/release/bundle/msi/*.msi
retention-days: 30
- name: Publish to Gitea Release
if: startsWith(github.ref, 'refs/tags/v')
run: |
$MSI = Get-ChildItem desktop/target/release/bundle/msi/*.msi | Select-Object -First 1
echo "MSI ready: $MSI"
build-linux:
runs-on: [self-hosted, linux, desktop] # runner sur une machine Linux
steps:
- uses: actions/checkout@v4
- name: Setup Rust
run: rustup default stable && rustup update
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev
- name: Setup Tauri CLI
run: cargo install tauri-cli --version "^2.0"
- name: Setup Python venv
run: |
python3 -m venv desktop/python-embed/venv
source desktop/python-embed/venv/bin/activate
pip install -r backend/requirements.txt
- name: Build AppImage
working-directory: desktop
run: cargo tauri build --bundles appimage
- name: Build deb
working-directory: desktop
run: cargo tauri build --bundles deb
- name: Upload Linux artifacts
uses: actions/upload-artifact@v4
with:
name: obsigate-linux
path: |
desktop/target/release/bundle/appimage/*.AppImage
desktop/target/release/bundle/deb/*.deb
retention-days: 30
+1
View File
@@ -731,6 +731,7 @@
- [ ] **Raccourcis clavier** : `Ctrl+N` nouveau fichier, `Ctrl+O` ouvrir vault, `Ctrl+,` paramètres
##### D. Build et distribution (2 jours)
- [x] **CI/CD automatisé** : workflow Gitea Actions `.gitea/workflows/desktop-build.yml` — build Windows + Linux à chaque push sur `main` (si `desktop/` modifié), upload des artefacts `.msi`/`.AppImage`/`.deb` en release
- [ ] **Build Windows** : `tauri build --target x86_64-pc-windows-msvc` → `.msi` + `.exe` installer
- [ ] **Build Linux** : `tauri build --target x86_64-unknown-linux-gnu` → `.deb`, `.rpm`, `.AppImage`
- [ ] **Auto-update** : endpoint `GET /api/desktop/update` → compare version → télécharge nouveau `.msi`