Skip to content

Commit

Permalink
Add section on automatic publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Apr 18, 2024
1 parent e86c50f commit e666c49
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Features
- Uncompromising code formatting with Black_.
- pytest_ helps you write better programs.
- Code coverage reporting with Codecov_.
- Fully automated version management and package publishing with semantic-release_.
- Fully automated version management and package publishing with semantic-release__.
- Continuous checks and tests with `GitHub Actions`__.
- `Keep a CHANGELOG`_.
- Consistent coding with EditorConfig_.
Expand All @@ -43,9 +43,9 @@ Features
.. _PyPI: https://pypi.python.org/pypi
.. _Pylint: https://www.pylint.org/
.. _Shields.io: https://shields.io/
.. __: https://semantic-release.gitbook.io/semantic-release/
.. __: https://github.com/features/actions
.. _pytest: https://docs.pytest.org/
.. _semantic-release: https://semantic-release.gitbook.io/semantic-release/

Bootstrapping a New Project
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -215,13 +215,38 @@ Run tests on changes with
Publishing
~~~~~~~~~~

Use the `poetry version`_ command to release a new version.
Then run `make version` to commit and push a new git tag
which will trigger a GitHub action.
New versions are created with `poetry version`_.

Publishing may be triggered using a `workflow_dispatch on GitHub Actions`_.
Automatic
^^^^^^^^^

New versions are released automatically with semantic-release_
as long as commits follow the `Angular Commit Message Conventions`_.

.. _Angular Commit Message Conventions: https://semantic-release.gitbook.io/semantic-release/#commit-message-format
.. _semantic-release: https://semantic-release.gitbook.io/

Manual
^^^^^^

Publish a new version by triggering a `version workflow_dispatch on GitHub Actions`_.
The `version` input will be passed as the first argument to `poetry version`_.

This may be done on the web or using the `GitHub CLI`_ with

::

$ gh workflow run version.yml --raw-field version=<version>

.. _Poetry version: https://python-poetry.org/docs/cli/#version
.. _GitHub CLI: https://cli.github.com/
.. _version workflow_dispatch on GitHub Actions: https://github.com/seamapi/javascript-http/actions?query=workflow%3Aversion

Publishing
~~~~~~~~~~

Publishing may be triggered using a `workflow_dispatch on GitHub Actions`_.

.. _workflow_dispatch on GitHub Actions: https://github.com/makenew/pypackage/actions?query=workflow%3Aversion

GitHub Actions
Expand Down

0 comments on commit e666c49

Please sign in to comment.