diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml new file mode 100644 index 0000000..7255219 --- /dev/null +++ b/.github/workflows/publish-to-pypi.yml @@ -0,0 +1,40 @@ +name: Publish to PyPI + +on: + release: + types: [published] + +jobs: + build-and-publish: + name: Build and publish to PyPI + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + # Setup Python (faster than using Python container) + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + + - name: Install pipenv + run: | + python -m pip install --upgrade pipenv wheel + - id: cache-pipenv + uses: actions/cache@v1 + with: + path: ~/.local/share/virtualenvs + key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} + + - name: Install dependencies + if: steps.cache-pipenv.outputs.cache-hit != 'true' + run: | + pipenv install --deploy --dev + - name: Build a binary wheel and a source tarball + run: | + pipenv run build + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/README.md b/README.md index 0078159..4ad3aab 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Install is either via pip or cloning the repository. From pip: ```sh -python3 -m pip install thothlibrary==0.8.1 +python3 -m pip install thothlibrary==0.8.2 ``` Or from the repo: diff --git a/thothlibrary/__init__.py b/thothlibrary/__init__.py index 95e02fc..250a4bc 100644 --- a/thothlibrary/__init__.py +++ b/thothlibrary/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """GraphQL client for Thoth""" -__version__ = "0.8.1" +__version__ = "0.8.2" __author__ = "Javier Arias " __copyright__ = "Copyright (c) 2020 Open Book Publishers" __license__ = "Apache 2.0"