Skip to content

Conversation

@reyammer
Copy link
Collaborator

@reyammer reyammer commented Oct 10, 2025

Up to now, python releases started with a GH release being created, and have involved a bunch of manual checks, e.g., check that the version in the git tag matches the version of the package, check that the version of the package is a non-dev one, check that the version of the underlying rusr CLI is a non-dev one, etc. And then, we would manually upload the wheels ourselves.

The new plan is to start releases via a push of a git tag of the form python-vX.Y.Z. If the GH action is triggered from a such a tag, we also perform a number of pre-release checks before building and testing the packages, and after we have all the wheels we would publish to pypi.

This PR implements all the pre-release checks we want, and the logic to trigger them in "strict mode" only when release tags are pushed.

There is also an initial stub for publishing to pypitest, but that's not complete. For now we keep this as-is, because it seems we need the gh action workflow on github to experiment with the trusted publisher thingy.

Fixes #948.
Fixes #1004.
Fixes #1041.

@reyammer reyammer force-pushed the py-build-release-gha branch 19 times, most recently from 842a8ee to 63b072a Compare October 30, 2025 09:35
- add pre-release-checks, gated by release tags
- run package checks on the actual artifacts (i.e., the packages), and not just from the source of the repo.
- add stub for actual release
- simplify "uv add magika" linux vs. windows, using shell: bash
- make uv version easily updatable
In GH actions, the "path" filter is not used for tags push. This means that any tag push would trigger this gh action, even if the push has nothing to do with it.

Fixed by triggering only for branch pushes to main (note: the branch filter is used for tags as well), and for any PR that relates to this.
…ot needed

if we don't do that, the build-wheels and other jobs will not run as the pre-release-checks is a dependency.
@reyammer reyammer force-pushed the py-build-release-gha branch from 781cc4d to a34f78c Compare October 30, 2025 10:16
@reyammer reyammer marked this pull request as ready for review October 30, 2025 10:19
@reyammer reyammer requested a review from invernizzi as a code owner October 30, 2025 10:19
@reyammer reyammer changed the title DO NOT MERGE - WIP - Automate pypi package releases python: Automated pre-release checks before publishing Oct 30, 2025
@reyammer reyammer merged commit ae7f09c into main Oct 30, 2025
87 checks passed
@reyammer reyammer deleted the py-build-release-gha branch October 30, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant