diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..de01b67 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,33 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + deploy: + + runs-on: [self-hosted, linux] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.7' + - name: Submodules + run: git submodule update --init --recursive + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* \ No newline at end of file diff --git a/setup.py b/setup.py index 34191da..eb6e145 100644 --- a/setup.py +++ b/setup.py @@ -57,10 +57,10 @@ def pull_first(): 'coolprop>=6.4.1', 'opencv-python==4.5.4.58'], url='https://github.com/j-c-cook/ghedt', - download_url='https://github.com/j-c-cook/ghedt/archive/v0.1-alpha.05.tar.gz', + download_url='https://github.com/j-c-cook/ghedt/archive/v0.1-alpha.06.tar.gz', long_description=long_description, long_description_content_type='text/markdown', - version='0.1-alpha.05', + version='0.1-alpha.06', packages=find_packages(), include_package_data=True, author='Jack C. Cook',