Files
hdlbuild/.github/workflows/build-deb.yml

64 lines
1.7 KiB
YAML

name: Build Wheels
on:
workflow_dispatch: # <-- Nur manuell über GitHub startbar
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: ⚙️ Prepare Environment Variables
run: |
echo "AGENT_TOOLSDIRECTORY=/home/runner/toolcache" >> $GITHUB_ENV
mkdir -p /home/runner/toolcache
- name: 🛒 Checkout Repository
uses: actions/checkout@v4
- name: 🐍 Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: 📦 Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
poetry self add poetry-plugin-export
- name: 🔧 Install Project Dependencies
run: |
poetry install
- name: 📝 Export requirements.txt
run: |
poetry export --without-hashes --format=requirements.txt > requirements.txt
- name: 📥 Download Wheels for Dependencies
run: |
mkdir -p dist/wheels
pip install wheel
pip download --only-binary=:all: --dest dist -r requirements.txt
- name: 🛠 Build Project Wheel
run: |
poetry build -f wheel
- name: 🔌 Install pipx and wheel2deb
run: |
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install wheel2deb
- name: 🛠 Convert Wheel to DEB
run: |
mkdir -p dist/debs
wheel2deb default -v -x dist -o dist/debs
- name: 📤 Upload dist/ artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/