Add pypi workflow (#14)

This commit is contained in:
Shunichi09 2021-05-28 14:35:59 +09:00 committed by GitHub
parent 2e0ac5c2f1
commit cf30226519
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 1 deletions

26
.github/workflow/python-publish.yml vendored Normal file
View File

@ -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/*

View File

@ -14,7 +14,7 @@ setup(
install_requires=install_requires, install_requires=install_requires,
url='https://github.com/Shunichi09/PythonLinearNonlinearControl', url='https://github.com/Shunichi09/PythonLinearNonlinearControl',
license='MIT License', license='MIT License',
packages=find_packages(exclude=('tests')), packages=find_packages(exclude=('tests', 'scripts')),
setup_requires=setup_requires, setup_requires=setup_requires,
test_suite='tests', test_suite='tests',
tests_require=tests_require tests_require=tests_require