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 : Publissh to PyCl
2- on : push
1+ name : Upload Python Package
2+
3+
4+ on :
5+ release :
6+ types : [ published ]
7+
8+
9+ permissions :
10+ contents : read
11+
12+
313jobs :
4- build :
5- name : Build distribution
14+ pypi-publish :
15+ name : Upload release to PyPI
616 runs-on : ubuntu-latest
717
18+ # Specifying a GitHub environment is optional, but strongly encouraged
19+ environment : release
20+ permissions :
21+ # IMPORTANT: this permission is mandatory for trusted publishing
22+ id-token : write
23+
824 steps :
9- - uses : actions/checkout@v4
10-
11- - name : Setup python
12- uses : actions/setup-python@v4
13- with :
14- python-version : " 3.x"
15-
16- - name : Install pypa/build
17- run : >-
18- python3 -m
19- pip install
20- build
21- --user
22-
23- - name : Build a binary wheel and a source tarball
24- run : python3 -m build
25-
26- - name : Store the distribution packages
27- uses : actions/upload-artifact@v3
28- with :
29- name : python-package-distributions
30- path : dist/
25+ - name : Build distribution
26+ run : |
27+ python -m pip install -U build
28+ python -m build
29+
30+ - name : Publish package distributions to PyPI
31+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change @@ -7,3 +7,7 @@ __pycache__/
77* $py.class
88
99* .ruff_cache
10+
11+ # Build
12+ dist /
13+ * .egg-info /
You can’t perform that action at this time.
0 commit comments