Skip to content

Commit

Permalink
pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
ea-rus committed Nov 21, 2024
1 parent 4b4e327 commit d9c4549
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and publish to pypi

on:
workflow_run:
workflows: ["Release"]
types:
- completed

jobs:
# Push a new release to PyPI
deploy_to_pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
if: github.actor != 'mindsdbadmin'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ vars.CI_PYTHON_VERSION }}
- name: Install dependencies
run: |
pip install setuptools wheel twine
- name: Clean previous builds
run: rm -rf dist/ build/ *.egg-info
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
# This uses the version string from __about__.py, which we checked matches the git tag above
python setup.py sdist
twine upload dist/*
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ jobs:
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml

0 comments on commit d9c4549

Please sign in to comment.