Skip to content

ci(release): publish simple_module_site_lock to PyPI - #260

Merged
antosubash merged 1 commit into
mainfrom
worktree-release-add-site-lock
Aug 10, 2026
Merged

ci(release): publish simple_module_site_lock to PyPI#260
antosubash merged 1 commit into
mainfrom
worktree-release-add-site-lock

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Problem

simple_module_site_lock shipped in #240 and is listed in the CLI catalog (smpy new offers it, requires=("auth", "settings")), but it was never added to the publish-pypi matrix in .github/workflows/release.yml.

The result: every release since v0.0.27 built a simple_module_site_lock wheel via uv build --all-packages and then dropped it on the floor. https://pypi.org/pypi/simple_module_site_lock/json returns 404 today — so anyone scaffolding an app with the site_lock module gets an unresolvable dependency.

Changes

1. Add simple_module_site_lock to the publish matrix. One line, alphabetically placed between settings and users.

2. Guard the invariant in scripts/check_metadata.py (already wired into make lint). A new check_release_matrix() cross-checks discovered workspace packages against the matrix in both directions:

  • a workspace package missing from the matrix → error (this bug)
  • a matrix entry with no workspace package → error (that release job would fail with no matching artifact)

This exact class of miss has now happened twice: simple_module_branding needed 35bb8df, and now site_lock.

The matrix is parsed with a targeted regex rather than adding a YAML dependency — the block is a flat list in a file we own, and a parse miss raises rather than returning an empty list, so a workflow reshuffle fails loudly instead of quietly reporting every package as unpublished.

Verification

  • scripts/check_metadata.py exits 1 with a clear message when the matrix entry is stashed away, 0 with it in place — the guard reproduces the bug.
  • uv build --package simple_module_site_lock produces simple_module_site_lock-0.0.29{-py3-none-any.whl,.tar.gz}, matching the workflow's dist-py/${{ matrix.package }}-* glob.
  • Wheel contents verified complete — site_lock serves a standalone templates/unlock.html (packaged) and has no pages/ or locales/ dirs.
  • scripts/tests/ 134 passed · modules/site_lock/tests + CLI catalog/packaging 70 passed
  • Repo-wide ruff format --check + ruff check + ty check + 300-line file-size cap all clean.

⚠️ Required before the next release run

simple_module_site_lock does not exist on PyPI yet, and this repo publishes via Trusted Publishing (OIDC). Publishing a brand-new project name requires a pending publisher to be registered on PyPI first, or the new matrix leg 403s — and because finalize depends on publish-pypi, a failed leg would block the version commit and tag for the whole release.

Add it at PyPI → Your projects → Publishing → Add a pending publisher:

Field Value
PyPI Project Name simple_module_site_lock
Owner antosubash
Repository name simple_module_python
Workflow name release.yml
Environment name pypi

https://claude.ai/code/session_01Hg8xa2po2YhoLjyxXeWwFm

site_lock shipped in #240 and is offered by the CLI catalog, but was never
added to the publish-pypi matrix — so every release built its wheel and then
dropped it on the floor. `pip install simple_module_site_lock` still 404s.

Add it to the matrix, and add a cross-check to scripts/check_metadata.py
(already run by `make lint`) so a workspace package can never again exist
without a release job — and a stale matrix entry can't linger without a
package. This bit us once with simple_module_branding (35bb8df) and again
here.

Claude-Session: https://claude.ai/code/session_01Hg8xa2po2YhoLjyxXeWwFm
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying simple-module-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6e98c77
Status: ✅  Deploy successful!
Preview URL: https://37b63dd8.simple-module-python.pages.dev
Branch Preview URL: https://worktree-release-add-site-lo.simple-module-python.pages.dev

View logs

@antosubash
antosubash merged commit 2aac3a4 into main Aug 10, 2026
13 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