Skip to content

Commit 0903e67

Browse files
committed
Remove development pypi, only publish releases
1 parent f208b9b commit 0903e67

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
name: Publish Python distribution to PyPI and TestPyPI
1+
name: Publish to PyPI
22

3-
on: push
3+
on:
4+
release:
5+
types: [published]
46

57
jobs:
68
build-n-publish:
7-
name: Build and Publish Python distribution to PyPI and TestPyPI
9+
name: Build and Publish to PyPI
810
runs-on: ubuntu-latest
11+
if: startsWith(github.ref, 'refs/tags')
912
steps:
1013
- uses: actions/checkout@master
1114
- name: Set up Python 3.10
@@ -18,13 +21,7 @@ jobs:
1821
- name: Build a binary wheel and a source tarball
1922
run: >-
2023
python -m build --sdist --wheel --outdir dist/
21-
- name: Publish Distribution to Test PyPI
22-
uses: pypa/gh-action-pypi-publish@release/v1
23-
with:
24-
password: ${{ secrets.TESTPYPI_API_TOKEN }}
25-
repository_url: https://test.pypi.org/legacy/
2624
- name: Publish Distribution to PyPI
27-
if: startsWith(github.ref, 'refs/tags')
2825
uses: pypa/gh-action-pypi-publish@release/v1
2926
with:
3027
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)