File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656
5757 publish :
5858 needs : build
59+ # Publishing happens on merge to main (stable.yml), so this path stays
60+ # off: the tags stable.yml pushes would otherwise start a second upload
61+ # of a version PyPI already has. The build job above still runs on every
62+ # v* tag — it verifies the tag matches pyproject, smoke-tests the wheel
63+ # and attests provenance. To go back to tag-driven releases, register a
64+ # PyPI trusted publisher for release.yml, drop this condition, and put
65+ # stable.yml's publish job back behind `if: ${{ false }}`.
66+ if : ${{ false }}
5967 runs-on : ubuntu-latest
6068 environment :
6169 name : pypi
Original file line number Diff line number Diff line change @@ -118,8 +118,12 @@ jobs:
118118
119119 publish :
120120 needs : test
121- # Publishing moved to release.yml: immutable v* tags + Trusted Publishing.
122- if : ${{ false }}
121+ # Releases ride on merges to main: this job bumps the patch version,
122+ # uploads to PyPI with the PYPI_API_TOKEN secret, then pushes the bump
123+ # commit (marked [skip ci]) and its v* tag. The guard is what keeps it
124+ # off pull requests and the nightly schedule, which the same workflow
125+ # also triggers on — without it every PR would cut a release.
126+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
123127 runs-on : ubuntu-latest
124128 permissions :
125129 contents : write
You can’t perform that action at this time.
0 commit comments