File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Python 🐍 distributions 📦 to PyPI
2+
3+ on :
4+ push :
5+ branches :
6+ - ' master'
7+ - ' test_deploy'
8+ tags :
9+ - ' *'
10+
11+ jobs :
12+ build-n-publish :
13+ name : Build and publish Python 🐍 distributions 📦 to PyPI
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@master
18+
19+ - name : Set up Python 3.10
20+ uses : actions/setup-python@v2
21+ with :
22+ python-version : 3.10
23+
24+ - name : Install pypa/build
25+ run : >-
26+ python -m
27+ pip install
28+ build
29+ --user
30+
31+ - name : Build a binary wheel and a source tarball
32+ run : >-
33+ python -m
34+ build
35+ --sdist
36+ --wheel
37+ --outdir dist/
38+ .
39+
40+ - name : Publish distribution 📦 to Test PyPI
41+ uses : pypa/gh-action-pypi-publish@master
42+ with :
43+ skip_existing : true
44+ password : ${{ secrets.test_pypi_password }}
45+ repository_url : https://test.pypi.org/legacy/
46+
47+ - name : Publish distribution 📦 to PyPI
48+ if : startsWith(github.ref, 'refs/tags')
49+ uses : pypa/gh-action-pypi-publish@master
50+ with :
51+ password : ${{ secrets.pypi_password }}
You can’t perform that action at this time.
0 commit comments