diff --git a/.github/workflows/weekly-preview.yml b/.github/workflows/weekly-preview.yml index 3640ceefd0..6cdc6c957f 100644 --- a/.github/workflows/weekly-preview.yml +++ b/.github/workflows/weekly-preview.yml @@ -6,9 +6,13 @@ permissions: on: schedule: - cron: "0 2 * * 0" # 02:00 of every Sunday + pull_request: + branches: + - dev jobs: static-checks: + if: github.event_name == 'schedule' # only check on cron run, these checks are redundant in a PR runs-on: ubuntu-latest strategy: matrix: @@ -53,9 +57,10 @@ jobs: uses: actions/setup-python@v6 with: python-version: '3.10' + cache: 'pip' - name: Install setuptools run: | - python -m pip install --user --upgrade setuptools wheel packaging + python -m pip install -U pip build - name: Build distribution run: | export HEAD_COMMIT_ID=$(git rev-parse HEAD) @@ -72,9 +77,14 @@ jobs: git tag "1.7.dev${YEAR_WEEK}" git log -1 git tag --list - python setup.py sdist bdist_wheel - + python -m build --config-setting="--extra-index-url=https://download.pytorch.org/whl/cpu" + ls -lh dist + - name: Test Installation + run: | + pip install dist/*.whl + pip list - name: Publish to PyPI + if: github.event_name == 'schedule' # only publish on cron run uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__