feat(18-02): Task 1 — Job desktop (Linux-AppImage) und Uebergabe an publish per actions/cache
- 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>
This commit is contained in:
+84
-1
@@ -2,6 +2,8 @@
|
||||
# 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:
|
||||
@@ -52,16 +54,97 @@ jobs:
|
||||
- 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: test
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user