Skip to content

Commit c032c9e

Browse files
authored
Update prerelease-deploy.yml
Added release workflow as well
1 parent 7109568 commit c032c9e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/prerelease-deploy.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Python application
55

66
on:
77
release:
8-
types: [prereleased]
8+
types: [prereleased, released]
99

1010
jobs:
1111
build:
@@ -44,8 +44,15 @@ jobs:
4444
sed -i -E -r "s/version = \"(.*)\"/version = \"${{ steps.get_version.outputs.VERSION }}\"/g" setup.py
4545
python setup.py sdist bdist_wheel
4646
- name: Deploy Distribution to Test PyPI
47+
if: github.event.release.prerelease
4748
uses: pypa/gh-action-pypi-publish@master
4849
with:
4950
user: ${{ secrets.TWINE_USERNAME_TEST }}
5051
password: ${{ secrets.TWINE_PASSWORD_TEST }}
5152
repository_url: https://test.pypi.org/legacy/
53+
- name: Deploy Distribution to PyPI
54+
if: github.event.release.release
55+
uses: pypa/gh-action-pypi-publish@master
56+
with:
57+
user: ${{ secrets.TWINE_USERNAME_PROD }}
58+
password: ${{ secrets.TWINE_PASSWORD_PROD }}

0 commit comments

Comments
 (0)