File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,36 +3,29 @@ name: Publish to PyPI
33on :
44 release :
55 types : [published]
6- workflow_dispatch : # Allow manual run from Actions tab
6+
7+ permissions :
8+ id-token : write # Required for trusted publishing
9+ contents : read
710
811jobs :
9- build-and-publish :
10- name : Build and Publish to PyPI
12+ build-n-publish :
1113 runs-on : ubuntu-latest
12-
1314 steps :
14- - name : Checkout source
15- uses : actions/checkout@v3
15+ - uses : actions/checkout@v3
1616
17- - name : Set up Python 3.10
17+ - name : Set up Python
1818 uses : actions/setup-python@v4
1919 with :
2020 python-version : ' 3.10'
2121
22- - name : Upgrade pip and install build tools
22+ - name : Install build tools
2323 run : |
2424 python -m pip install --upgrade pip
25- pip install build twine
25+ pip install build
2626
27- - name : Build the distribution
27+ - name : Build package
2828 run : python -m build
2929
30- - name : Verify distribution files
31- run : |
32- echo "Listing dist/ contents:"
33- ls -l dist/
34-
35- - name : Publish to PyPI
30+ - name : Publish to PyPI using Trusted Publisher
3631 uses : pypa/gh-action-pypi-publish@release/v1
37- with :
38- password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments