Skip to content

Commit b252182

Browse files
author
Mat Lord
committed
feat(workflow): deploy on release event
1 parent eebc2ff commit b252182

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: deploy
22

33
on:
4-
push:
5-
tags:
6-
- 'v*'
4+
release:
5+
types: [published]
76

87
jobs:
98
deploy:
@@ -24,13 +23,13 @@ jobs:
2423
run: |
2524
pipenv run python setup.py sdist bdist_wheel
2625
- name: Publish distribution 📦 to Test PyPI
27-
if: contains(github.ref, 'beta')
26+
if: github.event.release.prerelease == true
2827
uses: pypa/gh-action-pypi-publish@master
2928
with:
3029
password: ${{ secrets.TEST_PYPI_PASSWORD }}
3130
repository_url: https://test.pypi.org/legacy/
3231
- name: Publish distribution 📦 to PyPI
33-
if: contains(github.ref, 'beta') != true
32+
if: github.event.release.prerelease != true
3433
uses: pypa/gh-action-pypi-publish@master
3534
with:
3635
password: ${{ secrets.PYPI_PASSWORD }}

0 commit comments

Comments
 (0)