Skip to content

Commit d2527aa

Browse files
authored
Merge pull request #1 from JamaicanDevelopers/cicd
Setup cicd to pypi.
2 parents 6490b20 + 135bb23 commit d2527aa

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,19 @@ jobs:
5959
python -m pip install -U pip setuptools
6060
python -m pip install wheel --user
6161
python setup.py sdist bdist_wheel
62+
- name: Echo Refs
63+
run: |
64+
echo "Current Branch: ${{ github.ref }}"
65+
echo "Pull Source Branch: ${{ github.head_ref }}"
66+
echo "Event Trigger Branch ${{ github.event.ref }}"
6267
- name: Publish distribution 📦 to Test PyPI
63-
if: startsWith(github.event.ref, 'refs/tags')
68+
if: success() && startsWith(github.ref, 'refs/tags')
6469
uses: pypa/gh-action-pypi-publish@master
6570
with:
6671
password: ${{ secrets.test_pypi_password }}
6772
repository_url: https://test.pypi.org/legacy/
6873
- name: Publish distribution 📦 to PyPI
69-
if: startsWith(github.event.ref, 'refs/tags')
74+
if: success() && startsWith(github.ref, 'refs/tags')
7075
uses: pypa/gh-action-pypi-publish@master
7176
with:
7277
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)