Skip to content

Commit 5755345

Browse files
author
sprenger
committed
Update release triggers
1 parent 248dd06 commit 5755345

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: Create PYPI Release
22
on:
33
push:
4-
branches:
5-
- main
6-
paths:
7-
- VERSION
4+
# Pattern matched against refs/tags
5+
tags:
6+
- '*' # Push events to every tag not containing /
87

98
jobs:
109
build-n-publish:
@@ -36,7 +35,8 @@ jobs:
3635
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
3736
repository_url: https://test.pypi.org/legacy/
3837
- name: Publish distribution to PyPI
39-
if: startsWith(github.ref, 'refs/tags')
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')}
4040
uses: pypa/gh-action-pypi-publish@master
4141
with:
4242
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)