Automate PyPI publishing - #9400
Conversation
|
Build successful. Some useful links:
This preview will be removed when the branch is merged. |
|
Also leaving Claude Sonnet’s wisdom here on how to test this workflow before merging – I’m not going to take a closer look at this today anymore though:
|
|
I created the environment. I'm
|
|
Oh cool, I'll do a comparison with the sacrebleu one before I test this tomorrow! |
|
I guess this is a bit old already and the tooling is probably better (I don't remember creating a pypi environment, for example), but perhaps useful. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9400 +/- ##
=======================================
Coverage 96.95% 96.95%
=======================================
Files 36 36
Lines 3710 3710
=======================================
Hits 3597 3597
Misses 113 113 🚀 New features to boost your workflow:
|
|
I’ve successfully got this to run with TestPyPI on a throwaway branch (#9410) and added a few more improvements to the workflow. I also bumped setup-uv to the latest version in all workflows and gave them all more descriptive names while I was at it. :) This is ready. |

Resolves #8305
With the help of our AI friends, I’ve tried to create a workflow that should automate publishing new releases of the
acl-anthologypackage to PyPI.It’s supposed to work as follows:
python/pyproject.toml(which is where a version bump would happen) is pushed tomaster, thecheckjob of this workflow checks if a Git tag namedpy-v{{ $VERSION }}already exists.just prepare-new-releaserecipe, but a safeguard in case we bump the version some other way.)master, and posts a message in the PR if a new release would be triggered upon merging.releaseworkflow, which:py-v{{ $VERSION }}tag and pushes it.uv buildanduv publish, respectively.In terms of credentials, this should work because PyPI supports “trusted publishing” based on the repo name, workflow name, and environment the workflow runs in (named
pypihere). I’ve already set this up on the PyPI side.Steps we should take:
masterbranch, just to prevent mistakes. (must be done by @mjpost)