diff --git a/.github/workflows/publish_to_pypi.yaml b/.github/workflows/publish_to_pypi.yaml new file mode 100644 index 0000000..d7b354d --- /dev/null +++ b/.github/workflows/publish_to_pypi.yaml @@ -0,0 +1,35 @@ +name: Publish Python Package to PyPI + +# Trigger the workflow when a tag is pushed with a version starting with 'v' +on: + push: + tags: + - 'v*' + +jobs: + build-and-publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + + # Step name: Build package + - name: Build package + run: | + python setup.py sdist bdist_wheel + + # Step name: Publish to PyPI + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@v1.4.2 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 25299f8..1b075cd 100644 --- a/.gitignore +++ b/.gitignore @@ -159,3 +159,6 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ + +logs +.env \ No newline at end of file