File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change 11name : Publish Python Package
22
3- # Trigger on:
4- # - pushes to main (publish to PyPI after merge)
5- # - published GitHub Releases (publish to PyPI for versioned releases)
3+ # Trigger only on published GitHub Releases (tagged releases)
64on :
7- push :
8- branches : [main]
95 release :
106 types : [published]
117
@@ -41,17 +37,11 @@ jobs:
4137 name : python-package-distributions
4238 path : dist/
4339
44- # Publish from pushes to main OR when a Release is published -> Production PyPI
40+ # Publish only when a Release is published -> Production PyPI
4541 publish_pypi :
46- name : Publish to PyPI (main branch or GitHub Release)
42+ name : Publish to PyPI (GitHub Release only )
4743 runs-on : ubuntu-latest
4844 needs : build_sdist_and_wheel
49- # Run when:
50- # - push to main branch, or
51- # - release published event (keeps existing release-based behavior)
52- if : |
53- (github.event_name == 'push' && github.ref == 'refs/heads/main') ||
54- (github.event_name == 'release' && github.event.action == 'published')
5545 environment : pypi
5646 permissions :
5747 id-token : write
You can’t perform that action at this time.
0 commit comments