Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/dpkg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build .deb Package
on:
- push
- pull_request
jobs:
build-n-publish:
name: Build and publish dpkg package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }}
- name: Install Dependencies
run: |
python -m pip install poetry
python -m pip install poetry-dynamic-versioning
poetry self add "poetry-dynamic-versioning[plugin]"
poetry install
sudo apt install debhelper python3-all dh-python
- name: Build a binary wheel and a source tarball
run: >-
poetry build
poetry run dephell deps convert --from-format=wheel --from-path=dist/pkg_exporter-*.whl --to=setup.py
poetry build
- name: Build source pkg
run: >-
poetry run py2dsc dist/pkg_exporter-*.tar.gz
- name: Build debian pkg
run: |
cd deb_dist/pkg-exporter-*
dpkg-buildpackage -rfakeroot -uc -us
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ __pycache__/
build/
develop-eggs/
dist/
deb_dist/
downloads/
eggs/
.eggs/
Expand Down
Loading