File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767 cache : ' pip'
6868 - name : Install tools
6969 run : |
70- python -m pip install -U pip build
70+ python -m pip install -U pip build twine
7171 - name : Build distribution
7272 run : |
7373 export HEAD_COMMIT_ID=$(git rev-parse HEAD)
@@ -94,14 +94,15 @@ jobs:
9494 pip list
9595 (cd "$(mktemp -d)" && python -c 'import monai; print(monai.__version__)')
9696 - name : Publish to Test PyPI
97- if : github.event_name != 'schedule' # only test publish on PR
98- uses : pypa/gh-action-pypi-publish@release/v1
99- with :
100- repository-url : https://test.pypi.org/legacy/
101- user : __token__
102- password : ${{ secrets.TEST_PYPI_TOKEN }}
97+ if : github.event_name == 'pull_request' # only test publish on PR
98+ run : |
99+ twine upload -r testpypi dist/*
100+ env :
101+ TWINE_USERNAME : __token__
102+ TWINE_PASSWORD : ${{ secrets.TEST_PYPI_TOKEN }}
103+ TWINE_NON_INTERACTIVE : true
103104 - name : Publish to PyPI
104- if : github.event_name == 'schedule' # only publish on cron run
105+ if : github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' # only publish on cron or manual run
105106 uses : pypa/gh-action-pypi-publish@release/v1
106107 with :
107108 user : __token__
You can’t perform that action at this time.
0 commit comments