diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 796ac05..0507667 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -1,5 +1,29 @@ name: release +# This workflow will build a Python package and publish it to PyPI when a new tag is created. +# +# Usage: +# - Create a new tag with the version number in the format v*.*.* where * are single digit numbers +# - Push the tag to the repository with git push --tags +# +# Result: +# - The workflow will check if the new version is greater than the latest version on PyPI +# - The workflow will build the package and publish it to PyPI +# - The workflow will also create a GitHub release with the tag name and the release notes + +# Checklist for using this workflow up for a new project: +# - In this file: +# - Replace guitares with the name of your package +# - Replace 3.10 with the version of Python you want to use +# - In github settings: +# - Create an environment called `release` and setup the permissions (https://github.com///settings/environments) +# - On PyPi: +# - Create the project and add a trusted publisher (https://pypi.org/manage/project//settings/publishing/) +# - Ensure the publisher is configured to use: +# - environment name: `release` (can be changed, but should be the one created in the github settings) +# - the name of this workflow yml (in this case: publish-to-pypi.yml) +# + on: push: tags: