From cf302265197e5f8225a686631a0ab12dfe7e885a Mon Sep 17 00:00:00 2001 From: Shunichi09 Date: Fri, 28 May 2021 14:35:59 +0900 Subject: [PATCH] Add pypi workflow (#14) --- .github/workflow/python-publish.yml | 26 ++++++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflow/python-publish.yml diff --git a/.github/workflow/python-publish.yml b/.github/workflow/python-publish.yml new file mode 100644 index 0000000..5625efc --- /dev/null +++ b/.github/workflow/python-publish.yml @@ -0,0 +1,26 @@ +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.6 + uses: actions/setup-python@v2 + with: + python-version: '3.6' + - 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 bdist_wheel + twine upload dist/* \ No newline at end of file diff --git a/setup.py b/setup.py index b125f14..51b15d7 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ setup( install_requires=install_requires, url='https://github.com/Shunichi09/PythonLinearNonlinearControl', license='MIT License', - packages=find_packages(exclude=('tests')), + packages=find_packages(exclude=('tests', 'scripts')), setup_requires=setup_requires, test_suite='tests', tests_require=tests_require