Skip to content

Commit bda993c

Browse files
author
Jaipreet Singh
committed
Update CI to upload package when a release is created
1 parent e22301f commit bda993c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/python-publish.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
# This workflows will upload a Python Package when a tagged commit is pushed to the master branch.
1+
# This workflows will upload a Python Package when release is created from GitHub.
22
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
33

44
name: Upload Python Package
55

66
on:
7-
push:
8-
branches:
9-
- master
7+
release:
8+
types: [created]
109

1110
jobs:
1211
deploy:
@@ -27,7 +26,6 @@ jobs:
2726
run: |
2827
python setup.py sdist
2928
- name: Publish package
30-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
3129
uses: pypa/gh-action-pypi-publish@master
3230
with:
3331
user: __token__

0 commit comments

Comments
 (0)