Repository navigation
Publish from a tag with Trusted Publishing - #26
Merged
Merged
Conversation
…ct first
0.2.0 is on main but PyPI still serves the broken 0.1.x, so the fix has not
reached anyone. Releasing was a shell script, and the script no longer worked:
it required a git remote named `home` that a normal clone does not have, read
a long-lived PYPI_API_KEY out of ~/.pixeltable/config.toml, and called
`poetry build` after the project had moved to uv.
Releasing is now a tag push:
git tag vX.Y.Z && git push origin vX.Y.Z
No token exists. PyPI Trusted Publishing mints a short-lived credential from
the workflow's OIDC identity, so there is nothing to leak, rotate, or paste
into a shell. It needs a one-time pending publisher registered on PyPI;
RELEASING.md has the four fields.
The build job refuses to publish an artifact it has not exercised. It checks
the tag against pyproject.toml, runs twine check, then installs the built
wheel into a clean environment and constructs a real agent/memory with it.
That last step is the one that matters: 0.1.x shipped a package that could
not import against a current Pixeltable precisely because nothing ever
installed what it built. Verified locally on both projects; the wheel pulls
pixeltable 0.7.7 through the <0.8 bound and works.
workflow_dispatch defaults to dry_run, so the whole path can be exercised
without publishing. The publish job sits behind a `pypi` environment, which
is where a required-reviewer gate goes if you want one.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0.2.0 has been on
mainsince #25, but PyPI still serves 0.1.5, so nobody has actually received the fix. This makes releasing a tag push.The old script was broken
scripts/release.shcould not have worked as-is:home; a normal clone hasoriginPYPI_API_KEYout of~/.pixeltable/config.tomlpoetry buildafter Run on Pixeltable 0.7.6, declare the schema, and add CI #24 moved the project to uvThat last one is how 0.1.x shipped a package that could not import against a current Pixeltable. Nothing in the release path ever tried it.
Releasing now
git tag v0.2.0 && git push origin v0.2.0There is no token. PyPI Trusted Publishing mints a short-lived credential from the workflow's OIDC identity, so there is nothing to leak, rotate, or paste into a shell.
The build job refuses to publish an artifact it has not exercised:
pyproject.tomlversionuv build+twine checkVerified locally on both projects. Worth noting: the wheel resolves pixeltable 0.7.7 through the
<0.8bound and works — newer than the 0.7.6 we targeted, so the bound is doing its job.What you need to do once
On PyPI, Manage project → Publishing → Add a pending publisher:
pixeltablepixelagentrelease.ymlpypiThen tag.
RELEASING.mdhas the full process.Two optional extras: add a required reviewer to the
pypienvironment (Settings → Environments) if you want a human gate before each publish, and run the workflow from the Actions tab withdry_runchecked to exercise the whole path without publishing.Still not done by this PR
Adding
OPENAI_API_KEY/ANTHROPIC_API_KEY/GEMINI_API_KEYas repo secrets, so thelivejob can run. Without it, two things stay unverified: whether anthropic'smodel_kwargs={"system": ...}reaches the SDK as a top-levelsystem, and whether bedrock'sinference_config=mapstemperatureas the old splat did. I did not add those — I don't handle credentials.🤖 Generated with Claude Code