File tree Expand file tree Collapse file tree 1 file changed +29
-16
lines changed
Expand file tree Collapse file tree 1 file changed +29
-16
lines changed Original file line number Diff line number Diff line change 11name : 📦 Publish Python Package
22on :
33 release :
4- types : [created]
4+ types : [published]
5+ permissions :
6+ contents : read
57jobs :
8+ release-build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+ - uses : actions/setup-python@v5
13+ with :
14+ python-version : " 3.x"
15+ - name : Build release distributions
16+ run : |
17+ python -m pip install build
18+ python -m build
19+ - name : Upload distributions
20+ uses : actions/upload-artifact@v4
21+ with :
22+ name : release-dists
23+ path : dist/
624 pypi-publish :
7- name : Publish release to PyPI
825 runs-on : ubuntu-latest
26+ needs :
27+ - release-build
28+ permissions :
29+ id-token : write
30+ # Dedicated environments with protections for publishing are strongly recommended.
931 environment :
1032 name : pypi
1133 url : https://pypi.org/p/mmore
12- permissions :
13- id-token : write
1434 steps :
15- - uses : actions/checkout@v4
16- - name : Set up Python
17- uses : actions/setup-python@v4
35+ - name : Retrieve release distributions
36+ uses : actions/download-artifact@v4
1837 with :
19- python-version : " 3.x"
20- - name : Install dependencies
21- run : |
22- python -m pip install --upgrade pip
23- pip install setuptools wheel
24- - name : Build package
25- run : |
26- python setup.py sdist bdist_wheel # Could also be python -m build
27- - name : Publish package distributions to PyPI
38+ name : release-dists
39+ path : dist/
40+ - name : Publish release distributions to PyPI
2841 uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments