Skip to content

ci: gate PyPI publish behind full CI + environment approval - #20

Merged
Bre77 merged 2 commits into
mainfrom
fm/o10-e102-s3s-stream-release
Aug 6, 2026
Merged

ci: gate PyPI publish behind full CI + environment approval#20
Bre77 merged 2 commits into
mainfrom
fm/o10-e102-s3s-stream-release

Conversation

@Bre77

@Bre77 Bre77 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Intent

  • Adopt the candidate → gate → approval → publish release shape already used in python-tesla-fleet-api, so a tag push can't reach PyPI without the full CI gate passing on that exact SHA.
    • New .github/workflows/release.yml is a reusable workflow_call with a gate job (ruff, mypy, tests/test_*.py, uv build + twine check) that mirrors this repo's own ci.yml steps, followed by publish-to-pypi (needs gate, runs under the pypi environment) and github-release.
    • python-publish.yml is trimmed down to just the tag trigger (v*.*.*) and a call into release.yml, keeping the existing trusted-publishing OIDC setup (id-token: write, pypi environment + PyPI project URL) unchanged.
  • The pypi GitHub environment already exists and gates publish-to-pypi via environment: (same as before), but it currently has no protection rules (no required reviewers) configured - that's an org/repo-admin setting outside this repo's files, so it isn't part of this diff. Adding a required reviewer there is what turns the existing environment gate into the intended manual-approval step.

Adopt the release.yml/python-publish.yml split already used in
python-tesla-fleet-api: a reusable workflow_call gate job runs the
same lint/type-check/test/build steps CI does on the exact tag SHA,
and only then does the pypi environment (protected, OIDC trusted
publishing) allow the publish step to run.
@Bre77 Bre77 added the fm Opened by a Firstmate crewmate label Aug 6, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 71795a52eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

description: Python version to build/test/publish with
required: false
type: string
default: "3.13"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Run release tests across all supported Python versions

The package supports Python 3.9+, and the normal CI test job covers 3.9 through 3.13, but this release gate runs the suite only on the single default of 3.13. A tag containing a compatibility regression on 3.9–3.12 can therefore pass this purported full-CI gate and be published; use the same version matrix as .github/workflows/ci.yml before allowing the publish job to proceed.

AGENTS.md reference: AGENTS.md:L6-L6

Useful? React with 👍 / 👎.

The gate previously tested only Python 3.13, while ci.yml covers
3.9-3.13, so a compatibility regression on an older version could
pass the gate and publish. Split into lint/test/build jobs matching
ci.yml's shape, with test running the same version matrix; build
(and publish) stay single-version.
@Bre77

Bre77 commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

Fixed in 890d909: the release gate now runs lint + the full test python-version matrix (3.9-3.13, mirroring ci.yml) before build/publish-to-pypi, so a 3.9-3.12 regression can no longer slip through on the 3.13-only path.

@Bre77
Bre77 merged commit 596c485 into main Aug 6, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fm Opened by a Firstmate crewmate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant