Publish training package on PyPI
This commit is contained in:
parent
f94d16bcc3
commit
eb19d271fd
|
@ -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
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
include training/coqui_stt_training/VERSION
|
||||
include training/coqui_stt_training/GRAPH_VERSION
|
11
setup.py
11
setup.py
|
@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue