Skip to content

Commit b4bdfd3

Browse files
authored
fix github action for publishing releases (#1039)
* remove test pypi, add tag restriction * rename
1 parent 2e98a67 commit b4bdfd3

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

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

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
name: Publish distributions to PyPI (releases only) and TestPyPI (all commits)
1+
name: Publish distributions to PyPI
22

3-
on: push
3+
# if this workflow is modified to be a generic CI workflow then
4+
# add an if statement to the publish step so it only runs on tags.
5+
on:
6+
push:
7+
tags:
8+
- "v*"
49

510
jobs:
611
build-n-publish:
7-
name: Build and publish distributions to PyPI (releases only) and TestPyPI (all commits)
12+
name: Build and publish distributions to PyPI
813
if: github.repository == 'pvlib/pvlib-python'
914
runs-on: ubuntu-latest
1015
steps:
@@ -26,15 +31,7 @@ jobs:
2631
- name: Build packages
2732
run: python setup.py sdist bdist_wheel
2833

29-
- name: Publish distribution to Test PyPI
30-
uses: pypa/gh-action-pypi-publish@master
31-
with:
32-
user: __token__
33-
password: ${{ secrets.test_pypi_password }}
34-
repository_url: https://test.pypi.org/legacy/
35-
3634
- name: Publish distribution to PyPI
37-
if: startsWith(github.ref, 'refs/tags')
3835
uses: pypa/gh-action-pypi-publish@master
3936
with:
4037
user: __token__

0 commit comments

Comments
 (0)