File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Upload Python Package to PyPI when a Release is Created
1+ name : Publish to PyPI and attach build artifacts to the release
22
33on :
44 release :
5- types : [created ]
5+ types : [published ]
66
77jobs :
88 pypi-publish :
9- name : Publish release to PyPI
9+ name : Build, publish to PyPI, attach to release
1010 runs-on : ubuntu-latest
1111 environment :
1212 name : pypi
1313 url : https://pypi.org/p/testingbotclient
1414 permissions :
15- id-token : write
15+ id-token : write # OIDC trusted publishing to PyPI
16+ contents : write # upload built artifacts to the GitHub release
1617 steps :
1718 - uses : actions/checkout@v4
1819 - name : Set up Python
2526 run : python -m build
2627 - name : Publish package distributions to PyPI
2728 uses : pypa/gh-action-pypi-publish@release/v1
29+ - name : Attach distributions to the GitHub release
30+ run : gh release upload "${{ github.event.release.tag_name }}" dist/*.whl dist/*.tar.gz --clobber
31+ env :
32+ GH_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments