@@ -157,12 +157,13 @@ jobs:
157157 name : ${{ matrix.python }}-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}
158158 path : ./dist/*.whl
159159
160- # We upload nightlies only on cron job runs, so it doesn't overlap with
161- # builds from which we publish to PyPI - we don't want these extra
162- # dependencies when building release artifacts.
160+ # We upload nightlies only on (a) cron job runs, or (b) manual triggers
161+ # on `main`, so uploads don't overlap with builds from which we publish
162+ # to PyPI - we don't want these extra dependencies when building release
163+ # artifacts.
163164 - name : install micromamba
164165 # win-arm64 is unsupported by micromamba at the moment
165- if : github.event_name == 'schedule' && matrix.buildplat[1] != 'win_arm64'
166+ if : ( github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')) && matrix.buildplat[1] != 'win_arm64'
166167 uses : mamba-org/setup-micromamba@b09ef9b599704322748535812ca03efb2625677b # v2.0.5
167168 with :
168169 # For installation of anaconda-client, required for upload to anaconda.org
@@ -172,7 +173,7 @@ jobs:
172173 anaconda-client
173174
174175 - name : win-arm64 install anaconda client
175- if : github.event_name == 'schedule' && matrix.buildplat[1] == 'win_arm64'
176+ if : ( github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')) && matrix.buildplat[1] == 'win_arm64'
176177 run : |
177178 # Rust installation needed for rpds-py.
178179 Invoke-WebRequest https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe -UseBasicParsing -Outfile rustup-init.exe
@@ -181,7 +182,7 @@ jobs:
181182 pip install anaconda-client
182183
183184 - name : Upload to anaconda.org
184- if : github.event_name == 'schedule' && github.repository == 'numpy/numpy-release'
185+ if : ( github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')) && github.repository == 'numpy/numpy-release'
185186 shell : bash -el {0} # required for micromamba
186187 env :
187188 TOKEN : ${{ secrets.NUMPY_NIGHTLY_UPLOAD_TOKEN }}
0 commit comments