File tree 1 file changed +37
-0
lines changed
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
+ steps :
10
+ - uses : actions/checkout@v3
11
+ - name : Set up Python
12
+ uses : actions/setup-python@v4
13
+ with :
14
+ python-version : " 3.x"
15
+ - name : Install pypa/build
16
+ run : >-
17
+ python3 -m
18
+ pip install
19
+ build
20
+ --user
21
+ - name : Build a binary wheel and a source tarball
22
+ run : >-
23
+ python3 -m
24
+ build
25
+ --sdist
26
+ --wheel
27
+ --outdir dist/
28
+ - name : Publish distribution 📦 to Test PyPI
29
+ uses : pypa/gh-action-pypi-publish@release/v1
30
+ with :
31
+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
32
+ repository-url : https://test.pypi.org/legacy/
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