Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Publish distributions to PyPI (releases only) and TestPyPI (all commits)
name: Publish distributions to PyPI

on: push
# if this workflow is modified to be a generic CI workflow then
# add an if statement to the publish step so it only runs on tags.
on:
push:
tags:
- "v*"

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

- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/

- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
Expand Down