Skip to content

Commit 3262b67

Browse files
authored
change publish to pypi trigger to on release (#11)
* change publish to pypi trigger to on release
1 parent 70c22fd commit 3262b67

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed
Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
2-
3-
on: push
1+
name: Publish Python 🐍 distributions 📦 to PyPI
2+
on:
3+
release:
4+
types: [created]
45

56
jobs:
67
build-n-publish:
7-
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
8+
name: Build and publish Python 🐍 distributions 📦 to PyPI
89
runs-on: ubuntu-18.04
910
steps:
1011
- uses: actions/checkout@master
@@ -17,13 +18,8 @@ jobs:
1718
python
1819
setup.py
1920
sdist
20-
- name: Publish distribution 📦 to PyPI
21-
if: startsWith(github.event.ref, 'refs/tags')
22-
uses: pypa/gh-action-pypi-publish@master
23-
with:
24-
password: ${{ secrets.pypi_password }}
25-
- name: Publish distribution 📦 to Test PyPI
21+
- name: Publish package
2622
uses: pypa/gh-action-pypi-publish@master
2723
with:
28-
password: ${{ secrets.test_pypi_password }}
29-
repository_url: https://test.pypi.org/legacy/
24+
user: __token__
25+
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)