Skip to content

Update publish.yml

Update publish.yml #72

Workflow file for this run

name: Build
on:
push:
branches:
- master
jobs:
python-package:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install python 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