diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..e39f899f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,34 @@ +name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI + +on: + release: + types: [created] + +jobs: + build-n-publish: + name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + + - name: Set up Python + uses: actions/setup-python@v2 + working-directory: sdk + with: + python-version: 3.x + + - name: Install dependencies + working-directory: sdk + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + + - name: Build and publish + working-directory: sdk + 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/.github/workflows/tests.yml b/.github/workflows/tests.yml index 18f4cbde..3c0c82a8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,3 +1,5 @@ +name: Run tests + on: pull_request: push: diff --git a/sdk/optipyzer/const.py b/sdk/optipyzer/const.py index c7d60210..f4e4deea 100644 --- a/sdk/optipyzer/const.py +++ b/sdk/optipyzer/const.py @@ -1,4 +1,4 @@ -VERSION = "0.1.0" +VERSION = "0.3.2" LICENSE = "Apache 2.0" SLEEP_MIN = 0.2 # Enforce minimum wait time between API calls (seconds) diff --git a/sdk/setup.py b/sdk/setup.py index 08e45a71..34f31f1c 100644 --- a/sdk/setup.py +++ b/sdk/setup.py @@ -1,4 +1,5 @@ import setuptools +from optipyzer.const import VERSION # create long desc. with open("README.md", "r") as fh: @@ -11,7 +12,7 @@ setuptools.setup( name='optipyzer', - version=0.24, + version=VERSION, description='Codon optimize DNA and Protein sequences for multiple species.', long_description=long_description, long_description_content_type='text/markdown',