Files
TougliGui/.github/workflows/build.yml
Blomios b0e6d09301
Some checks failed
Release / create-release (push) Has been cancelled
Release / build-linux (push) Has been cancelled
Release / build-windows (push) Has been cancelled
Release / build-macos (push) Has been cancelled
fix: correct artifact names in release job
2026-04-25 23:02:38 +02:00

100 lines
2.6 KiB
YAML

name: Build & Release
on:
push:
branches:
- '**' # toutes les branches
tags:
- 'v*'
pull_request:
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- platform: 'windows-latest'
name: 'windows'
- platform: 'ubuntu-22.04'
name: 'linux'
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' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
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' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
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
release:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Télécharger les artefacts Windows
uses: actions/download-artifact@v4
with:
name: windows-build
path: artifacts/windows
- name: Télécharger les artefacts Linux
uses: actions/download-artifact@v4
with:
name: linux-build
path: artifacts/linux
- name: Créer la release GitHub
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/windows/**
artifacts/linux/**
generate_release_notes: true