File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Upload Python Package
22
33on :
4- # Only run when a release is created
54 release :
6- types : [created ]
5+ types : [published ]
76
87jobs :
98 deploy :
109 runs-on : ubuntu-latest
10+ permissions :
11+ # IMPORTANT: this permission is mandatory for trusted publishing
12+ id-token : write
1113 steps :
12- - uses : actions/checkout@v1
13- - name : Set up Python
14- uses : actions/setup-python@v1
15- with :
16- python-version : ' 3.x'
17- - name : Install dependencies
18- run : |
19- python -m pip install --upgrade pip
20- pip install setuptools wheel twine
21- - name : Build and publish
22- env :
23- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
24- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
25- run : |
26- python setup.py sdist bdist_wheel
27- twine upload dist/*
14+ - uses : actions/checkout@v3
15+ - name : Set up Python
16+ uses : actions/setup-python@v4
17+ with :
18+ python-version : ' 3.x'
19+ - name : Install dependencies
20+ run : |
21+ python -m pip install --upgrade pip
22+ pip install build
23+ - name : Build package
24+ run : python -m build --sdist --wheel
25+ - name : Publish package
26+ uses : pypa/gh-action-pypi-publish@release/v1
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments