diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 33a850c..3f24435 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -2,8 +2,8 @@ name: Publish Package on: push: - branches: - - master + tags: + - '[0-9]+.[0-9]+.[0-9]+' jobs: build-and-publish: @@ -17,20 +17,22 @@ jobs: python-version: 3.9 - name: Install pypa/build run: | - python -m pip install --upgrade setuptools pip wheel + python -m pip install --upgrade setuptools pip wheel twine python -m pip install build --user - name: Build a binary wheel and a source tarball - run: python -m build --sdist --wheel --outdir dist/ . + run: | + python -m build --sdist --wheel --outdir dist/ . + twine check --strict dist/* - name: Publish package to test PyPI if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/ - name: Publish package to PyPI if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/README.rst b/README.rst index 40e9386..f591eda 100644 --- a/README.rst +++ b/README.rst @@ -15,6 +15,9 @@ luma.core .. image:: https://coveralls.io/repos/github/rm-hull/luma.core/badge.svg?branch=master :target: https://coveralls.io/github/rm-hull/luma.core?branch=master +.. image:: https://readthedocs.org/projects/luma-core/badge/?version=latest + :target: https://luma-core.readthedocs.io/en/latest/ + .. image:: https://img.shields.io/pypi/pyversions/luma.core.svg :target: https://pypi.python.org/project/luma.core @@ -24,8 +27,6 @@ luma.core .. image:: https://img.shields.io/pypi/dm/luma.core :target: https://pypi.python.org/project/luma.core -.. image:: https://img.shields.io/maintenance/yes/2022.svg?maxAge=2592000 - **luma.core** is a component library providing a `Pillow `_-compatible drawing canvas for Python 3, and other functionality to support drawing primitives and text-rendering capabilities for small displays on the Raspberry Pi and other diff --git a/doc/index.rst b/doc/index.rst index acd6d4e..a00c950 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -7,7 +7,8 @@ luma.core .. image:: https://coveralls.io/repos/github/rm-hull/luma.core/badge.svg?branch=master :target: https://coveralls.io/github/rm-hull/luma.core?branch=master -.. image:: https://img.shields.io/maintenance/yes/2022.svg?maxAge=2592000 +.. image:: https://readthedocs.org/projects/luma-core/badge/?version=latest + :target: https://luma-core.readthedocs.io/en/latest/ .. image:: https://img.shields.io/pypi/pyversions/luma.core.svg :target: https://pypi.org/project/luma.core