Skip to content

Build

Build #85

Workflow file for this run

name: Build
on:
workflow_run:
workflows:
- Testing
types:
- completed
jobs:
build:
runs-on: ubuntu-22.04
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install twine jinja2
- id: pkg_version
run: echo "data=$(echo ${{ github.event.release.tag_name }} | cut -c2-)" >> $GITHUB_OUTPUT
- name: Build Python package
run: |
python -c 'import jinja2;jinja2.Template(open("setup.j2").read()).stream(version="${{ steps.pkg_version.outputs.data }}").dump("setup.py")'
python setup.py sdist bdist_wheel