Skip to content

chore: Update packaging jobs (#19) #5

chore: Update packaging jobs (#19)

chore: Update packaging jobs (#19) #5

on:
workflow_call:
inputs:
requirements_file:
type: "string"
required: false
default: "pyproject.toml"
python-version:
type: "string"
required: false
default: "3.12"
jobs:
build-and-check:
name: Build and check package metadata
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: git fetch --tags
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: pip
cache-dependency-path: ${{ inputs.requirements_file }}
check-latest: true
- name: Install dependencies
run: python3 -m pip install --upgrade build twine
- name: Build
run: python3 -m build --sdist --wheel .
- name: Check package metadata
run: twine check --strict dist/*