Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section on automatic publishing #7

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 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,14 +215,32 @@ 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
.. _workflow_dispatch on GitHub Actions: https://github.com/makenew/pypackage/actions?query=workflow%3Aversion
.. _GitHub CLI: https://cli.github.com/
.. _version workflow_dispatch on GitHub Actions: https://github.com/seamapi/javascript-http/actions?query=workflow%3Aversion

GitHub Actions
--------------
Expand Down