# 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