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