File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
2
+
3
+ on : push
4
+
5
+ jobs :
6
+ build-n-publish :
7
+ name : Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
8
+ runs-on : ubuntu-latest
9
+
10
+ steps :
11
+ - uses : actions/checkout@v3
12
+ - name : Set up Python
13
+ uses : actions/setup-python@v4
14
+ with :
15
+ python-version : " 3.x"
16
+
17
+ - name : Install pypa/build
18
+ run : >-
19
+ python3 -m
20
+ pip install
21
+ build
22
+ --user
23
+
24
+ - name : Build a binary wheel and a source tarball
25
+ run : >-
26
+ python3 -m
27
+ build
28
+ --sdist
29
+ --wheel
30
+ --outdir dist/
31
+ .
32
+
33
+ - name : Publish distribution 📦 to PyPI
34
+ if : startsWith(github.ref, 'refs/tags')
35
+ uses : pypa/gh-action-pypi-publish@release/v1
36
+ with :
37
+ password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments