File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,9 +10,14 @@ permissions:
1010 contents : read
1111
1212jobs :
13+ # Reuse the full lint + test workflow so a release never ships from a
14+ # broken tree, even if the tag was pushed without a CI run on the commit.
1315 test :
1416 uses : ./.github/workflows/tests.yml
1517
18+ # Build sdist and wheel once and hand them to the publish job as an
19+ # artifact, so what gets uploaded to PyPI is exactly what was built here.
20+ # Also fails fast if the git tag disagrees with _version.py.
1621 build :
1722 needs : test
1823 runs-on : ubuntu-latest
@@ -46,10 +51,11 @@ jobs:
4651 name : dist
4752 path : dist/
4853
54+ # Upload the built artifacts to PyPI via trusted publishing.
55+ # Only runs on an actual version tag -- workflow_dispatch runs stop at
56+ # the build/test stage so you can dry-run the release without shipping it.
4957 publish :
5058 needs : build
51- # Only publish on an actual version tag -- workflow_dispatch runs stop at
52- # the build/test stage so you can dry-run the release without shipping it.
5359 if : startsWith(github.ref, 'refs/tags/')
5460 runs-on : ubuntu-latest
5561 environment :
Original file line number Diff line number Diff line change 66 workflow_call :
77
88jobs :
9+ # Static checks: ruff lint + formatting. Runs once on a single Python
10+ # version since the result does not depend on the interpreter.
911 lint :
1012 runs-on : ubuntu-latest
1113 steps :
2527 - name : Ruff format check
2628 run : ruff format --check .
2729
30+ # Test suite across all supported Python versions, plus a build check
31+ # to catch packaging errors early. Skipped if lint fails to save CI minutes.
2832 test :
2933 needs : lint
3034 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments