Skip to content

Commit e5a7a7a

Browse files
authored
ci: anaconda nightlies (#1019)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 2121e36 commit e5a7a7a

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

.github/workflows/wheels.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ on:
1111
pull_request:
1212
paths:
1313
- .github/workflows/wheels.yml
14+
schedule:
15+
- cron: "34 3 * * *"
16+
17+
permissions:
18+
actions: read
1419

1520
concurrency:
16-
group: wheels-${{ github.head_ref }}
21+
group: ${{ github.workflow }}-${{ github.ref }}
1722
cancel-in-progress: true
1823

1924
env:
@@ -139,3 +144,27 @@ jobs:
139144
subject-path: "dist/boost_histogram-*"
140145

141146
- uses: pypa/gh-action-pypi-publish@release/v1
147+
148+
upload_nightly_wheels:
149+
name: Upload nightly wheels to Anaconda Cloud
150+
if: |
151+
(github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') &&
152+
!github.event.repository.fork &&
153+
github.ref == 'refs/heads/develop'
154+
needs: [build_wheels]
155+
runs-on: ubuntu-latest
156+
steps:
157+
- uses: actions/download-artifact@v4
158+
with:
159+
pattern: wheels-*
160+
merge-multiple: true
161+
path: dist
162+
163+
- name: List all files
164+
run: ls -lh dist
165+
166+
- name: Upload wheel to Anaconda Cloud as nightly
167+
uses: scientific-python/upload-nightly-action@b36e8c0c10dbcfd2e05bf95f17ef8c14fd708dbf # 0.6.2
168+
with:
169+
artifacts_path: dist
170+
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
[![GitHub Discussion][github-discussions-badge]][github-discussions-link]
1414
[![Gitter][gitter-badge]][gitter-link]
1515
[![Scikit-HEP][sk-badge]](https://scikit-hep.org/)
16+
[![SPEC 4 — Using and Creating Nightly Wheels][spec4-badge]][spec4-link]
1617

1718
Python bindings for [Boost::Histogram][] ([source][Boost::Histogram source]), a C++14 library. This is one of the [fastest libraries][] for
1819
histogramming, while still providing the power of a full histogram object. See
@@ -314,3 +315,5 @@ Support for this work was provided by the National Science Foundation cooperativ
314315
[Boost::Histogram source]: https://github.com/boostorg/histogram
315316
[Hist]: https://github.com/scikit-hep/hist
316317
[fastest libraries]: https://iscinumpy.gitlab.io/post/histogram-speeds-in-python/
318+
[spec4-badge]: https://img.shields.io/badge/SPEC-4-green?labelColor=%23004811&color=%235CA038
319+
[spec4-link]: https://scientific-python.org/specs/spec-0004/

0 commit comments

Comments
 (0)