Skip to content

Commit 7d7a3db

Browse files
Update PyPI workflow
1 parent ac7aac8 commit 7d7a3db

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

.github/workflows/deploy-pypi.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ on:
2121
env:
2222
PYTHON_VERSION: '3.11'
2323
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.version }}
24-
UPLOAD_PYPI: ${{ github.event_name != 'release' && github.event.inputs.upload-pypi || 'true' }}
25-
UPLOAD_TESTPYPI: ${{ github.event_name != 'release' && github.event.inputs.upload-testpypi || 'false' }}
2624

2725
jobs:
2826
build_package:
@@ -59,7 +57,7 @@ jobs:
5957
publish_to_testpypi:
6058
needs: build_package
6159
runs-on: ubuntu-latest
62-
if: ${{ env.UPLOAD_TESTPYPI == 'true' }}
60+
if: ${{ github.event_name != 'release' && github.event.inputs.upload-testpypi }}
6361
environment:
6462
name: testpypi
6563
url: https://test.pypi.org/p/torchani-dev-test
@@ -80,7 +78,7 @@ jobs:
8078
publish_to_pypi:
8179
needs: build_package
8280
runs-on: ubuntu-latest
83-
if: ${{ env.UPLOAD_PYPI == 'true' }}
81+
if: ${{ github.event_name == 'release' || github.event.inputs.upload-pypi }}
8482
environment:
8583
name: pypi
8684
url: https://pypi.org/p/torchani

0 commit comments

Comments
 (0)