1c306ae391
- assets/icon.png + icon.ico (16-256 px), gezeichnet von assets/make_icon.py - app/version.py: Name, Version, Beschreibung, Copyright an einer Stelle - build.py: Windows-.exe mit --icon und --version-file (Eigenschaften -> Details); icon.png wird ins Programm gepackt; Archive mit Versionsnummer; Linux-Archiv mit icon.png und install-desktop.sh (Startmenü-Eintrag) - app/viewer.py: Fenster-Icon zur Laufzeit (auch Linux), Version im Titel - tests/test_icon_version.py, README, build.yml (Artefakt-Name) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
69 lines
2.2 KiB
YAML
69 lines
2.2 KiB
YAML
# Baut das fertige Programm (PyInstaller, siehe build.py) und legt es als
|
|
# Artefakt am Workflow-Lauf ab (in Gitea: Actions -> Lauf -> Artefakte).
|
|
#
|
|
# Startet bei einem Versions-Tag (z.B. "git tag v1.0 && git push origin v1.0")
|
|
# oder von Hand in Gitea unter Actions -> "Build" -> "Run workflow".
|
|
|
|
name: Build
|
|
|
|
on:
|
|
push:
|
|
tags: ["v*"]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
linux:
|
|
# Label deines Linux-Runners (wie in tests.yml). Das Programm läuft auf
|
|
# Linux-Systemen mit gleich neuer oder neuerer glibc als dieses Image.
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Code holen
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Python 3.11
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Systembibliotheken für Qt und PyInstaller
|
|
run: |
|
|
SUDO=""
|
|
if [ "$(id -u)" != "0" ]; then SUDO="sudo"; fi
|
|
$SUDO apt-get update
|
|
$SUDO apt-get install -y --no-install-recommends \
|
|
libegl1 libgl1 libxkbcommon0 libfontconfig1 libdbus-1-3 libglib2.0-0 binutils
|
|
|
|
- name: Python-Pakete
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install -r requirements-build.txt
|
|
|
|
- name: Programm bauen
|
|
run: python build.py
|
|
|
|
- name: Artefakt hochladen
|
|
# v3: wird von allen Gitea-Versionen unterstützt (v4 erst ab neueren Versionen)
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: Fahrdaten-Tool-linux
|
|
path: dist/Fahrdaten-Tool-*-linux.tar.gz
|
|
|
|
# Windows-.exe: braucht einen Runner auf Windows (act_runner direkt auf
|
|
# einem Windows-Rechner, Label z.B. "windows"). Ohne einen solchen Runner
|
|
# bliebe der Job ewig in der Warteschlange, darum auskommentiert.
|
|
# Alternativ lokal bauen: python build.py
|
|
#
|
|
# windows:
|
|
# runs-on: windows
|
|
# steps:
|
|
# - uses: actions/checkout@v4
|
|
# - uses: actions/setup-python@v5
|
|
# with:
|
|
# python-version: "3.11"
|
|
# - run: python -m pip install -r requirements-build.txt
|
|
# - run: python build.py
|
|
# - uses: actions/upload-artifact@v3
|
|
# with:
|
|
# name: Fahrdaten-Tool-windows
|
|
# path: dist/Fahrdaten-Tool-*-windows.zip
|