Publish training package on PyPI

This commit is contained in:
Reuben Morais 2021-08-27 13:09:04 +02:00
parent f94d16bcc3
commit eb19d271fd
3 changed files with 27 additions and 9 deletions

View File

@ -762,6 +762,29 @@ jobs:
with:
name: ${{ github.job }}-checkpoint.tar.xz
path: ${{ github.workspace }}/artifacts/checkpoint.tar.xz
twine-upload-training:
name: "Upload STT training packages to PyPI"
runs-on: ubuntu-20.04
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Update pip and install deps
run: |
python -m pip install -U pip setuptools twine build
- run: |
python -m build
- name: Setup PyPI config
run: |
cat << EOF > ~/.pypirc
[pypi]
username=__token__
password=${{ secrets.PYPI_TRAINING_TOKEN }}
EOF
- run: |
twine upload --repository pypi dist/*
twine-upload-stt:
name: "Upload STT packages to PyPI"
runs-on: ubuntu-20.04

2
MANIFEST.in Normal file
View File

@ -0,0 +1,2 @@
include training/coqui_stt_training/VERSION
include training/coqui_stt_training/GRAPH_VERSION

View File

@ -8,7 +8,7 @@ from setuptools import find_packages, setup
def main():
version_file = Path(__file__).parent / "VERSION"
version_file = Path(__file__).parent / "training" / "coqui_stt_training" / "VERSION"
with open(str(version_file)) as fin:
version = fin.read().strip()
@ -68,14 +68,7 @@ def main():
packages=find_packages(where="training"),
python_requires=">=3.5, <4",
install_requires=install_requires,
# If there are data files included in your packages that need to be
# installed, specify them here.
package_data={
"coqui_stt_training": [
"VERSION",
"GRAPH_VERSION",
],
},
include_package_data=True,
)