Skip to content

Initial release

Initial release #4

Workflow file for this run

name: Publish Python Package to PyPI
on:
release:
types: [created]
jobs:
build-and-publish:
name: Build and publish Python package to PyPI
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # Required for trusted publishing
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install build dependencies
working-directory: ./tools/generator
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build package
working-directory: ./tools/generator
run: python -m build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# No API token needed if using trusted publishing with PyPI
# Ensure your PyPI project is configured for trusted publishing:
# https://docs.pypi.org/trusted-publishers/adding-a-publisher/
# If not using trusted publishing, you would configure 'password' with a PYPI_API_TOKEN secret:
# with:
# password: ${{ secrets.PYPI_API_TOKEN }}
with:
packages_dir: tools/generator/dist/