Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will upload a Python Package using Twine when a release is created | |
| # See https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | |
| # Also see https://github.com/marketplace/actions/pypi-publish | |
| name: Build Debian package 📦 | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| build-deb: | |
| name: Build Debian package 📦 | |
| runs-on: ubuntu-latest | |
| # Add permissions for releases | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.11' | |
| - name: Install apt packages | |
| run: sudo apt-get update && sudo apt upgrade -y && sudo apt-get install -y dpkg-dev debhelper dh-python build-essential python3-all | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install setuptools | |
| pip install stdeb3 | |
| pip install python-dateutil | |
| pip install wheel | |
| - name: Clean up previous builds | |
| run: rm -rf deb_dist/ || true | |
| - name: Build Debian package | |
| run: | | |
| make build_deb || exit 1 | |
| - name: List built packages | |
| run: find deb_dist -name "*.deb" | |
| - name: Upload Debian package to release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| token: ${{ secrets.PAT }} | |
| files: "deb_dist/*.deb" | |
| tag_name: ${{ github.event.release.tag_name }} |