Skip to content

Commit 80ecf43

Browse files
committed
2 parents 7b6ad33 + 50f4a7d commit 80ecf43

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

.github/workflows/publish-to-pypi.yml

+16-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
22

3-
on: push
4-
3+
on:
4+
# Trigger the workflow on push , PR or release publish,
5+
# but only for the main branch
6+
push:
7+
branches:
8+
- master
9+
pull_request:
10+
branches:
11+
- master
12+
release:
13+
types:
14+
- published
15+
- released
16+
517
jobs:
618
build-n-publish:
719
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
@@ -15,13 +27,13 @@ jobs:
1527
- name: Build package
1628
run: python setup.py sdist
1729
- name: Publish distribution 📦 to Test PyPI
30+
if: github.event_name == 'push'
1831
uses: pypa/gh-action-pypi-publish@master
1932
with:
2033
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
2134
repository_url: https://test.pypi.org/legacy/
2235
- name: Publish distribution 📦 to PyPI
23-
if: startsWith(github.ref, 'refs/tags')
36+
if: github.event_name == 'release'
2437
uses: pypa/gh-action-pypi-publish@master
2538
with:
2639
password: ${{ secrets.PYPI_API_TOKEN }}
27-

polypheny/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Update this for the versions
22
# Don't change the forth version number from None
3-
VERSION = (0, 2, 0, None)
3+
VERSION = (0, 2, 0, None)

0 commit comments

Comments
 (0)