File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed 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+ steps :
10+ - uses : actions/checkout@v4
11+ with :
12+ persist-credentials : false
13+ - name : Set up Python
14+ uses : actions/setup-python@v5
15+ with :
16+ python-version : " 3.x"
17+ - name : Install pypa/build
18+ run : >-
19+ python3 -m
20+ pip install
21+ build
22+ --user
23+ - name : Build a binary wheel and a source tarball
24+ run : python3 -m build
25+ - name : Store the distribution packages
26+ uses : actions/upload-artifact@v4
27+ with :
28+ name : python-package-distributions
29+ path : dist/
30+ publish-to-testpypi :
31+ name : Publish Python 🐍 distribution 📦 to TestPyPI
32+ needs :
33+ - build
34+ runs-on : ubuntu-latest
35+
36+ environment :
37+ name : testpypi
38+ url : https://test.pypi.org/p/mdc-regression
39+
40+ permissions :
41+ id-token : write # IMPORTANT: mandatory for trusted publishing
42+
43+ steps :
44+ - name : Download all the dists
45+ uses : actions/download-artifact@v4
46+ with :
47+ name : python-package-distributions
48+ path : dist/
49+ - name : Publish distribution 📦 to TestPyPI
50+ uses : pypa/gh-action-pypi-publish@release/v1
51+ with :
52+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments