File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Python package to PyPI
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ permissions :
8+ contents : read
9+
10+ jobs :
11+ build :
12+ name : Build distribution
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - name : Set up Python
19+ uses : actions/setup-python@v5
20+ with :
21+ python-version : " 3.x"
22+
23+ - name : Install build dependencies
24+ run : python -m pip install build
25+
26+ - name : Build package
27+ run : python -m build
28+
29+ - name : Upload distribution artifacts
30+ uses : actions/upload-artifact@v4
31+ with :
32+ name : python-package-distributions
33+ path : dist/
34+
35+ publish-to-pypi :
36+ name : Publish to PyPI
37+ needs : build
38+ runs-on : ubuntu-latest
39+ environment :
40+ name : pypi
41+ url : https://pypi.org/p/cect
42+ permissions :
43+ id-token : write # Required for Trusted Publisher (OIDC)
44+
45+ steps :
46+ - name : Download distribution artifacts
47+ uses : actions/download-artifact@v4
48+ with :
49+ name : python-package-distributions
50+ path : dist/
51+
52+ - name : Publish to PyPI
53+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments