Skip to content

ci: gate PyPI publish on a protected-environment approval - #10

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

ci: gate PyPI publish on a protected-environment approval#10
Bre77 merged 2 commits into
mainfrom
fm/o10-e102-s3a-aiopw-release

Conversation

@Bre77

@Bre77 Bre77 commented Aug 6, 2026

Copy link
Copy Markdown
Member

What

Splits the PyPI publish workflow into a reusable release.yml gate and a
thin tag-triggered caller, so the full CI gate (ruff, mypy, pytest, build,
twine check) runs on the exact release SHA and the publish job waits on
the existing pypi environment before it can run.

  • pypi-publish.yml now only triggers on v*.*.* tags and calls
    release.yml — no more building/publishing directly on any push.
  • release.yml runs the same checks as ci.yml (ruff check, mypy,
    pytest) across the same Python 3.11-3.13 matrix as ci.yml, then a
    single-version build + twine check, uploads the dist, then publishes
    to PyPI via trusted publishing (unchanged) and creates the GitHub
    Release, gated behind the pypi environment.

This mirrors the shape adopted in python-tesla-fleet-api's
release.yml/python-publish.yml.

Needs admin follow-up: the pypi environment already exists but has
no required reviewers configured, so the "protected-environment approval"
step is currently a no-op gate. Someone with environment-admin access
needs to add required reviewers to the pypi environment for the
approval step to actually block publishing.

Split publish into a reusable release.yml (full CI gate: ruff, mypy,
pytest, build, twine check) that runs on the exact tag SHA before the
PyPI publish job, which now waits on approval via the existing pypi
environment. pypi-publish.yml is now a thin tag-triggered caller.
@Bre77 Bre77 added the fm Opened by a Firstmate crewmate label Aug 6, 2026
@Bre77
Bre77 merged commit d9e27d6 into main Aug 6, 2026
5 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