Skip to content

Merge pull request #21 from odigos-io/dynamic-imports #8

Merge pull request #21 from odigos-io/dynamic-imports

Merge pull request #21 from odigos-io/dynamic-imports #8

Workflow file for this run

name: Publish Python Package
on:
push:
tags:
- 'v*' # Trigger on version tags
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Update version based on tag
run: |
VERSION_TAG=${GITHUB_REF#refs/tags/}
sed -i "s/version=.*/version='${VERSION_TAG}',/" setup.py
- name: Build the package
run: |
python setup.py sdist bdist_wheel
- name: Publish to PyPI
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload dist/*