Inspired by the more complete repo workflows owned by Kevin Deldycke
Maintaining project takes time. This repository contains workflows to automate most of the boring tasks.
These workflows are mostly used for Poetry-based Python CLI and their documentation, but not only. They're all reuseable GitHub actions workflows.
Reasons for a centralized workflow repository:
- reuseability of course: no need to update dozens of repository where 95% of workflows are the same
- centralize all dependencies pertaining to automation: think of the point-release of an action that triggers dependabot upgrade to all your repositories dependeing on it
TODO: To-Be-Review-And-Updated
It turns out Release Engineering is a full-time job, and full of edge-cases.
Rust has cargo-dist
. Go has... ? But there is no equivalent for Python.
So I made up a release.yaml
workflow, which:
- Extracts project metadata from
pyproject.toml
- Generates a build matrix of all commits / os / arch / CLI entry points
- Build Python wheel with Twine
- Compile binaries of all CLI with Nuitka
- Tag the release commit in Git
- Publish new version to PyPi
- Publish a GitHub release
- Attach and rename build artifacts to it
A detailed changelog is available.
Check these projects to get real-life examples of usage and inspiration:
django-errors - Django application for handling server errors.
django-requests-api - Django application to provide simple and shared requests client.
django-sp - Django application for custom Social Profile Auth and User model.
django-custom-storage - Django application provide custom storage uses S3 and Compressor.
django-iubenda - Django application for handling privacy and cookie policies configured with Iubenda.
django-hashtag - Django application provide hashtag functionality.
django-model-mixin - Django application provide simple model's mixins to add common reusable attributes.
django-lang - Django application to provide useful utils and reusable parts of code for multi-languages sites.
django-static-base - Django's application to serve up-to-date common static files (JQuery, Bootstrap, Plugins, ...) as "base" static directory
django-sites-extra - Django application to extend the standard "sites" framework with extra utils.
Feel free to send a PR to add your project in this list if you are relying on these scripts.
TODO: To-Be-Review-And-Updated
All steps of the release process and version management are automated in the
changelog.yaml
and
release.yaml
workflows.
All there's left to do is to:
- check the open draft
prepare-release
PR and its changes, - click the
Ready for review
button, - click the
Rebase and merge
button, - let the workflows tag the release and set back the
main
branch into a development state.