To create an automated release and automatically publish to PyPI for the Pythonik project, follow these steps to ensure the process is smooth and automated:
-
Update the Changelog:
- Open the
docs/CHANGELOG.mdfile. - Add a new entry for the version you are about to release. Ensure the version number is clearly mentioned and follows the format used in previous entries.
- Include a descriptive release name within quotes, as this will be extracted automatically by the workflow. For example:
## 1955-11-05 "Great Scott, Marty McFly!" - version 8.8.8 "Exciting New Features" - Backwards compatibility with the future - flux capicator
- Open the
-
Commit the Changes:
- After updating the changelog, commit your changes. Make sure your commit message is clear and descriptive.
- Example commit message:
Update changelog for version 8.8.8
-
Tag the Commit:
- Tag the commit including or after your changelog update. This tag will trigger the release workflow. Pythonik uses semantic versioning. Please see the semver.org website for more information.
- Use the following command to tag your commit:
git tag 8.8.8
- Push the tag to the repository:
git push --tags
-
Automated Release Process:
- Once the tag is pushed, the GitHub Actions workflow
.github/workflows/create-release.ymlwill automatically run. - The workflow will:
- Extract the version and release name from the changelog.
- Generate release notes based on the commit history.
- Create a GitHub release with the extracted information.
- Once the tag is pushed, the GitHub Actions workflow
-
Publishing the Release:
- The release will be published to PyPI automatically.
- Release Name Extraction: The workflow uses
awkto find the version line in the changelog and extracts the release name from it. Ensure the release name is enclosed in quotes.
By following these steps, you can ensure that the release process for Pythonik is efficient and automated.