.github: Add workflow for creating a pypi package

Add a package workflow with the latest python version to test creating a
pypi release.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2024-09-18 18:55:17 +02:00 committed by Marc Herbert
parent 4d1d8ad4d2
commit 38aae907fd
1 changed files with 25 additions and 0 deletions

25
.github/workflows/package.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Python Package
on: [push, pull_request, workflow_call]
jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Python dependencies
run: |
pip3 install build
- name: Build a binary wheel and a source tarball
run: |
python -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/