Skip to content

Commit d9c4549

Browse files
committed
pypi
1 parent 4b4e327 commit d9c4549

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/workflows/pypi.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build and publish to pypi
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Release"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
# Push a new release to PyPI
11+
deploy_to_pypi:
12+
name: Publish to PyPI
13+
runs-on: ubuntu-latest
14+
if: github.actor != 'mindsdbadmin'
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python
18+
uses: actions/[email protected]
19+
with:
20+
python-version: ${{ vars.CI_PYTHON_VERSION }}
21+
- name: Install dependencies
22+
run: |
23+
pip install setuptools wheel twine
24+
- name: Clean previous builds
25+
run: rm -rf dist/ build/ *.egg-info
26+
- name: Build and publish
27+
env:
28+
TWINE_USERNAME: __token__
29+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
30+
run: |
31+
# This uses the version string from __about__.py, which we checked matches the git tag above
32+
python setup.py sdist
33+
twine upload dist/*

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ jobs:
5656
with:
5757
pytest-coverage-path: ./pytest-coverage.txt
5858
junitxml-path: ./pytest.xml
59+

0 commit comments

Comments
 (0)