Skip to content
Merged
Changes from 9 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 @@ -66,10 +66,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 +92,17 @@ 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' && github.repository == 'Project-MONAI/MONAI' # only test publish on PR
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
Comment thread
ericspod marked this conversation as resolved.
Outdated
run: |
echo "$TWINE_PASSWORD" | wc
twine upload --verbose -r testpypi dist/*
Comment thread
ericspod marked this conversation as resolved.
Outdated
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
TWINE_NON_INTERACTIVE: true
- name: Publish to PyPI
if: github.event_name == 'schedule' # only publish on cron run
if: github.event_name == 'schedule' # only publish on cron run
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand Down
Loading