Skip to content

Commit 954bdb8

Browse files
committed
Publish package to pypi for tags only, and to testpypi for develop only
1 parent c5b43c4 commit 954bdb8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727

2828
publish-to-pypi:
2929
name: Publish IMAS-Python distribution to PyPI
30+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
3031
needs:
3132
- build
3233
runs-on: ubuntu-latest
@@ -46,6 +47,7 @@ jobs:
4647

4748
publish-to-testpypi:
4849
name: Publish IMAS-Python distribution to TestPyPI
50+
if: github.ref=='refs/heads/develop' # only publish to TestPyPI on develop pushes
4951
needs:
5052
- build
5153
runs-on: ubuntu-latest
@@ -64,4 +66,4 @@ jobs:
6466
uses: pypa/gh-action-pypi-publish@unstable/v1
6567
with:
6668
repository-url: https://test.pypi.org/legacy/
67-
verbose: true
69+
verbose: true

0 commit comments

Comments
 (0)