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 : Publish Python distribution to PyPI and TestPyPI
2+
3+ on : push
4+
5+ jobs :
6+ build :
7+ name : Build distribution
8+ runs-on : ubuntu-latest
9+
10+ steps :
11+ - uses : actions/checkout@v4
12+ with :
13+ persist-credentials : false
14+ - name : Set up Python
15+ uses : actions/setup-python@v5
16+ with :
17+ python-version : " 3.11"
18+ - name : Install pypa/build
19+ run :
20+ python3 -m pip install build --user
21+ - name : Build a binary wheel and a source tarball
22+ run : python3 -m build
23+ - name : Store the distribution packages
24+ uses : actions/upload-artifact@v4
25+ with :
26+ name : python-package-distributions
27+ path : dist/
28+
29+ publish-to-pypi :
30+ name : Publish Python distribution to PyPI
31+ if : startsWith(github.ref, 'refs/tags/')
32+ needs :
33+ - build
34+ runs-on : ubuntu-latest
35+ environment :
36+ name : pypi
37+ url : https://pypi.org/p/ccx-messaging
38+ permissions :
39+ id-token : write
40+
41+ steps :
42+ - name : Download all the dists
43+ uses : actions/download-artifact@v4
44+ with :
45+ name : python-package-distributions
46+ path : dist/
47+ - name : Publish distribution to PyPI
48+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments