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