1c4247a7c9
Baut nach dem AppImage zusaetzlich den Windows-Installer per Cross-Bau auf dem Linux-Runner (cargo-xwin, NSIS aus dem Ubuntu-Paket), cached SDK und NSIS-Plugins, und sammelt beide Dateien mit --require linux,windows ein. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
177 lines
5.6 KiB
YAML
177 lines
5.6 KiB
YAML
# Kanalmodell (quick-260914-ku1): main -> Kanal beta (Etiketten beta + latest);
|
|
# Tag v* -> Kanal live (Etiketten live + vX.Y.Z); Zweig live ohne Tag wird nur geprueft.
|
|
# Die Entscheidung trifft .gitea/scripts/publish-images.sh anhand GITHUB_REF.
|
|
# Tag v* (quick-260916-dcz): zusaetzlich Gitea-Release aus dem CHANGELOG.md-Abschnitt (publish-release.sh).
|
|
# Phase 18 (18-02): Job `desktop` baut vor `publish` das Linux-AppImage und
|
|
# uebergibt es per actions/cache; `publish` bricht ohne Manifest ab.
|
|
# Phase 18 (18-05): Derselbe Job baut zusaetzlich den Windows-Installer per
|
|
# Cross-Bau (cargo-xwin, NSIS aus dem Ubuntu-Paket) -- kein Windows-Rechner
|
|
# in der Pipeline. `tauri.conf.json`/`Cargo.toml` bleiben dabei immer rein
|
|
# numerisch (X.Y.Z), weil NSIS' Windows-Ressourcenfelder das verlangen; die
|
|
# Beta-Kennzeichnung lebt ausschliesslich im Dateinamen-Suffix.
|
|
name: Tessera CI/CD
|
|
|
|
on:
|
|
push:
|
|
branches: [main, live]
|
|
tags: ['v*']
|
|
|
|
jobs:
|
|
quality:
|
|
name: Lint & Type Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
|
|
- name: Enable pnpm via corepack
|
|
run: corepack enable && corepack prepare pnpm@9.15.0 --activate
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Lint
|
|
run: pnpm lint
|
|
|
|
- name: Type check
|
|
run: pnpm type-check
|
|
|
|
test:
|
|
name: Tests
|
|
runs-on: ubuntu-latest
|
|
needs: quality
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
|
|
- name: Enable pnpm via corepack
|
|
run: corepack enable && corepack prepare pnpm@9.15.0 --activate
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Run tests
|
|
run: pnpm test
|
|
|
|
desktop:
|
|
name: Desktop-Pakete bauen
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
if: gitea.ref == 'refs/heads/main' || startsWith(gitea.ref, 'refs/tags/v')
|
|
steps:
|
|
# Ohne volle Historie und Tags liefert `git describe` nichts -- Pflicht fuer die Version.
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
|
|
- name: Enable pnpm via corepack
|
|
run: corepack enable && corepack prepare pnpm@9.15.0 --activate
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Systemabhaengigkeiten
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends \
|
|
libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev \
|
|
libayatana-appindicator3-dev librsvg2-dev \
|
|
libgtk-3-dev libssl-dev patchelf file xdg-utils \
|
|
lld llvm clang nsis
|
|
|
|
- name: Rust-Toolchain
|
|
run: |
|
|
curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
|
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Cargo-Zwischenspeicher
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
~/.cargo/bin/cargo-xwin
|
|
~/.cache/tauri
|
|
~/.cache/cargo-xwin
|
|
~/.local/share/tauri
|
|
apps/desktop/src-tauri/target
|
|
key: desktop-cargo-${{ hashFiles('apps/desktop/src-tauri/Cargo.lock') }}
|
|
restore-keys: desktop-cargo-
|
|
|
|
- name: Windows-Werkzeuge
|
|
run: |
|
|
rustup target add x86_64-pc-windows-msvc
|
|
command -v cargo-xwin >/dev/null 2>&1 || cargo install --locked cargo-xwin
|
|
|
|
- name: Version setzen
|
|
run: sh .gitea/scripts/desktop-version.sh
|
|
|
|
- name: Rust pruefen
|
|
working-directory: apps/desktop/src-tauri
|
|
run: |
|
|
cargo check
|
|
cargo clippy
|
|
|
|
- name: Alte Bundles entfernen
|
|
run: |
|
|
rm -rf apps/desktop/src-tauri/target/release/bundle
|
|
rm -rf apps/desktop/src-tauri/target/x86_64-pc-windows-msvc/release/bundle
|
|
|
|
- name: Linux-AppImage bauen
|
|
run: pnpm --filter @tessera/desktop exec tauri build --bundles appimage
|
|
|
|
- name: Windows-Installer bauen (Cross-Bau)
|
|
run: pnpm --filter @tessera/desktop exec tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc --bundles nsis
|
|
|
|
- name: Pakete einsammeln
|
|
run: sh .gitea/scripts/desktop-collect.sh --require linux,windows
|
|
|
|
- name: Uebergabe an publish
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: desktop-dist
|
|
key: desktop-dist-${{ gitea.sha }}
|
|
|
|
publish:
|
|
name: Build & Publish Images
|
|
runs-on: ubuntu-latest
|
|
needs: desktop
|
|
steps:
|
|
# Ohne volle Historie und Tags liefert `git describe` nichts -- Pflicht fuer den Stempel.
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Desktop-Pakete aus dem Zwischenspeicher holen
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: desktop-dist
|
|
key: desktop-dist-${{ gitea.sha }}
|
|
fail-on-cache-miss: true
|
|
|
|
- name: Pakete pruefen
|
|
run: |
|
|
test -f desktop-dist/manifest.json
|
|
jq . desktop-dist/manifest.json
|
|
|
|
- name: Log in to Gitea Container Registry
|
|
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login localhost:3002 -u ${{ gitea.actor }} --password-stdin
|
|
|
|
- name: Versionsstempel berechnen, Abbilder bauen und veroeffentlichen
|
|
run: sh .gitea/scripts/publish-images.sh
|
|
|
|
- name: Gitea-Release zum Freigabe-Tag anlegen (nur bei Tags v*)
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
|
run: sh .gitea/scripts/publish-release.sh
|