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