From 52ce35f35e8f36b83c6fd6156feeeb6b6fbc5ddd Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:04:23 +0530 Subject: [PATCH] Upload nightly wheels for PyWavelets to the Scientific Python Nightly Wheels index on Anaconda (#710) --- .github/workflows/emscripten.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 0ff3ea3de..d5e8fc32b 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -9,6 +9,18 @@ on: branches: - master - v1.** + # Make it possible to upload wheels manually if needed + workflow_dispatch: + inputs: + push_wheels: + description: > + 'Push wheels to Anaconda if "true". Default is "false". Warning: this will overwrite existing wheels.' + required: false + default: "false" + # Upload wheels to Anaconda on a schedule + schedule: + # Run at 0300 hours on days 3 and 17 of the month + - cron: "0 3 3,17 * *" env: FORCE_COLOR: 3 @@ -58,3 +70,12 @@ jobs: pip install matplotlib pytest python -c "import pywt; print(pywt.__version__)" pytest --pyargs pywt + + # https://anaconda.org/scientific-python-nightly-wheels/pywavelets + # WARNING: this job will overwrite existing wheels. + - name: Push to Anaconda PyPI index + if: (github.repository == 'PyWavelets/pywt') && (github.event_name == 'push' && github.ref == 'refs/heads/master') || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_wheels == 'true') || (github.event_name == 'schedule') + uses: scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc # v0.5.0 + with: + artifacts_path: dist/ + anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}