Skip to content

Publish from a tag with Trusted Publishing - #26

Merged
pierrebrunelle merged 1 commit into
mainfrom
chore/release-workflow
Sep 10, 2026
Merged

pierrebrunelle merged 1 commit into
mainfrom
chore/release-workflow

Conversation

@pierrebrunelle

Copy link
Copy Markdown
Member

0.2.0 has been on main since #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.sh could not have worked as-is:

That 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.0

There 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:

  1. tag must match pyproject.toml version
  2. uv build + twine check
  3. install the built wheel into a clean venv and construct a real agent with it

Verified locally on both projects. Worth noting: the wheel resolves pixeltable 0.7.7 through the <0.8 bound 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:

field value
owner pixeltable
repository pixelagent
workflow release.yml
environment pypi

Then tag. RELEASING.md has the full process.

Two optional extras: add a required reviewer to the pypi environment (Settings → Environments) if you want a human gate before each publish, and run the workflow from the Actions tab with dry_run checked to exercise the whole path without publishing.

Still not done by this PR

Adding OPENAI_API_KEY / ANTHROPIC_API_KEY / GEMINI_API_KEY as repo secrets, so the live job can run. Without it, two things stay unverified: whether anthropic's model_kwargs={"system": ...} reaches the SDK as a top-level system, and whether bedrock's inference_config= maps temperature as the old splat did. I did not add those — I don't handle credentials.

🤖 Generated with Claude Code

…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>
@pierrebrunelle
pierrebrunelle merged commit 6b79930 into main Sep 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant