File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed
Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Python 🐍 distribution 📦 to PyPI
2+ on : push
3+ jobs :
4+ build :
5+ name : Build distribution 📦
6+ runs-on : ubuntu-latest
7+ steps :
8+ - uses : actions/checkout@v4
9+ with :
10+ fetch-depth : 0
11+ fetch-tags : true
12+ - name : Set up Python
13+ uses : actions/setup-python@v5
14+ with :
15+ python-version : " 3.12"
16+ - name : Install hatch
17+ uses : pypa/hatch@install
18+ - name : Build a binary wheel and a source tarball
19+ run : hatch build
20+ - name : Store the distribution packages
21+ uses : actions/upload-artifact@v4
22+ with :
23+ name : python-package-distributions
24+ path : dist/
25+ publish-to-pypi :
26+ name : Publish Python 🐍 distribution 📦 to PyPI
27+ if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
28+ needs :
29+ - build
30+ runs-on : ubuntu-latest
31+ environment :
32+ name : pypi
33+ url : https://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@v4
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
Original file line number Diff line number Diff line change 1- name : Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
1+ name : Publish Python 🐍 distribution 📦 to TestPyPI
22on : push
33jobs :
44 build :
You can’t perform that action at this time.
0 commit comments