a6ffe05150
- Neuer CI-Job desktop nach test, laeuft auf main und bei Tags v* (Systemabhaengigkeiten,
Rust-Toolchain per rustup, Cargo-Zwischenspeicher, Version setzen, cargo check/clippy,
alte Bundles entfernen, Linux-AppImage bauen, desktop-collect.sh --require linux,
Uebergabe per actions/cache/save mit Schluessel desktop-dist-${{ gitea.sha }})
- publish haengt jetzt an desktop (needs: desktop) statt an test, holt die Pakete per
actions/cache/restore mit fail-on-cache-miss: true und prueft das Manifest hart
- publish-images.sh bricht im echten Baupfad ohne desktop-dist/manifest.json ab
(zweites Netz gegen einen Cache-Fehlschlag, D-08/Pitfall 1)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
158 lines
4.7 KiB
YAML
158 lines
4.7 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 (Windows-NSIS
|
|
# folgt in 18-05) und uebergibt es per actions/cache; `publish` bricht ohne Manifest ab.
|
|
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
|
|
|
|
- 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
|
|
~/.cache/tauri
|
|
apps/desktop/src-tauri/target
|
|
key: desktop-cargo-${{ hashFiles('apps/desktop/src-tauri/Cargo.lock') }}
|
|
restore-keys: desktop-cargo-
|
|
|
|
- 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
|
|
|
|
- name: Linux-AppImage bauen
|
|
run: pnpm --filter @tessera/desktop exec tauri build --bundles appimage
|
|
|
|
- name: Pakete einsammeln
|
|
run: sh .gitea/scripts/desktop-collect.sh --require linux
|
|
|
|
- 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
|