Skip to content

Commit c9bf89b

Browse files
author
sprenger
committed
Trigger PyPI packaging via github releases
1 parent fb7a603 commit c9bf89b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
name: Create PYPI Release
22
on:
3-
push:
4-
# Pattern matched against refs/tags
5-
tags:
6-
- '*' # Push events to every tag not containing /
3+
release:
4+
types: [published]
75

86
jobs:
97
build-n-publish:
@@ -35,8 +33,6 @@ jobs:
3533
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
3634
repository_url: https://test.pypi.org/legacy/
3735
- name: Publish distribution to PyPI
38-
# only consider version tags starting with 'v' and not alpha or beta releases
39-
if: startsWith(github.ref, 'refs/tags/v') & ~{contains(github.ref, '-a') || contains(github.ref, '-b')}
4036
uses: pypa/gh-action-pypi-publish@master
4137
with:
4238
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)