Skip to content

Commit

Permalink
ci: publish when semantic versioned tag is pushed (#263)
Browse files Browse the repository at this point in the history
* ci: publish when semantic versioned tag is pushed

* doc: remove maintained badge

* doc: remove maintained badge

* add docs badge

* add docs badge
  • Loading branch information
thijstriemstra committed Feb 21, 2023
1 parent 4398fa7 commit d871d66
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/publish-to-pypi.yml
Expand Up @@ -2,8 +2,8 @@ name: Publish Package

on:
push:
branches:
- master
tags:
- '[0-9]+.[0-9]+.[0-9]+'

jobs:
build-and-publish:
Expand All @@ -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 }}
Expand Down
5 changes: 3 additions & 2 deletions README.rst
Expand Up @@ -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

Expand All @@ -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 <https://pillow.readthedocs.io/>`_-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
Expand Down
3 changes: 2 additions & 1 deletion doc/index.rst
Expand Up @@ -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
Expand Down

0 comments on commit d871d66

Please sign in to comment.