Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/weekly-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
pull_request:
branches:
- dev
workflow_dispatch:
Comment thread
ericspod marked this conversation as resolved.
Outdated

env:
PYTHON_VER: '3.10'
Expand Down Expand Up @@ -66,10 +67,12 @@ jobs:
cache: 'pip'
- name: Install tools
run: |
python -m pip install -U pip build
python -m pip install -U pip build twine
- name: Build distribution
run: |
export HEAD_COMMIT_ID=$(git rev-parse HEAD)
# remove git clone dependencies, see https://github.com/Project-MONAI/MONAI/issues/5882
sed -i /git+/d pyproject.toml
sed -i 's/name\ =\ "monai"$/name\ =\ "monai-weekly"/g' pyproject.toml
echo "__commit_id__ = \"$HEAD_COMMIT_ID\"" >> monai/__init__.py
git diff pyproject.toml monai/__init__.py
Expand All @@ -90,8 +93,16 @@ jobs:
pip install dist/*.whl
pip list
(cd "$(mktemp -d)" && python -c 'import monai; print(monai.__version__)')
- name: Publish to Test PyPI
if: github.event_name == 'pull_request' # only test publish on PR
run: |
twine upload -r testpypi dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
TWINE_NON_INTERACTIVE: true
Comment thread
ericspod marked this conversation as resolved.
Outdated
- name: Publish to PyPI
if: github.event_name == 'schedule' # only publish on cron run
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' # only publish on cron or manual run
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand Down
Loading